Question:
C compiler for linux?
xskillz123x
2008-04-17 21:29:56 UTC
I have anjuta and I know how to use the g++ command on terminal but they only make linux executables. I want to know, is there any linux program that can make windows executables? I used WINE windows emulator and installed bloodshed Dev-C++ but I get a list of errors when trying to compile, most of them say 'Linker Error' in front of them. Please just tell me a Linux program that will compile C scripts into windows programs..! I am using Ubuntu operating system.
Three answers:
General Cucombre
2008-04-17 21:54:47 UTC
There's no such thing.



Well, almost.



You're looking for a cross-compiler. GCC and perhaps some other suites do exist as cross-compilers, however those are very hard to come by and the effort of building one yourself is not worth it for most practical purposes.



The previous answer is misleading. MinGW mentioned above is NOT cross-compiler - it's a compiler that works on Windows and produces binaries for Windows.



If Linux is the only machine you have access to, install VMWare Server onto it (Free) and run Windows in it with any normal Windows compiler, like Microsoft Visual C++ 2008 Express (Free) or GCC or even that MinGW.



WINE will probably work too, but it's not as robust.

The linker errors you're getting most likely have to do with your program - work through them. If you get a lot of errors, the problems are likely in your program code - not in compiler - you need to port the code to Windows.
?
2016-10-20 05:07:10 UTC
Linux has greater workstation programming utility which you would be able to set up for loose, than you may shake a stick at. evaluate working twin boot, you have the suited of the two structures.
inclusive_disjunction
2008-04-17 21:35:06 UTC
http://www.mingw.org/



@General Cucombre: Had you bothered to read for more than 5 seconds, you would know that MinGW runs on Linux.



http://packages.ubuntu.com/feisty/mingw32


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...