PDA

View Full Version : target OS compilers



DavidP
06-29-2002, 12:18 PM
What compilers are capable of compiling programs to Linux, Unix, BeOS, Macintosh, and all of those other operating systems?

I know Visual C++ (at least to the best of my knowledge) is only capable of compiling to Windows.

Borland C++ (also just to the best of my knowledge) is capable of DOS and Windows.

What compilers are capable of compiling to other OS's? And, if they are capable of compiling to other operating systems, are you able to compile to that operating system using Windows?

For example, lets say I had a program I wanted to compile for Linux, and I am using a compiler that is able to do that, but it is also able to compile to Windows, and I am currently using a Windows system....could I just tell it to compile to Linux instead, and even though I would not be able to run that program on my Windows machine, would it still be able to compile it correctly for Linux?

sean
06-29-2002, 12:26 PM
It might get tricky with different file formats. I don't think Windows can store Linux files, let alone run them like you said.

DavidP
06-29-2002, 12:30 PM
well i dont want to run the Linux/BeOS/Mac/etc. programs on my Windows system...I just want to compile them so I can upload them to my website for people to download.

Dual-Catfish
06-29-2002, 12:32 PM
I don't think Windows can store Linux files, let alone run them like you said.
Sure they can.. a binary is just a collection of 1's and 0's, why wouldn't a windows file system be able to hold it? You've probably downloaded files packed on linux before (ever download a 'zip' with the extension tar? or gz?)

SilentStrike
06-29-2002, 05:26 PM
I can compile windows executables with xmingw from Linux.

Shiro
06-30-2002, 04:36 AM
Why not uploading several versions, for different OS'es? You can use cross-compilers to compile for different targets.

DavidP
07-01-2002, 10:38 AM
people! give me names here! just tell me, what compilers can compile for operating systems other than Windows and DOS. and where can i find them.

Shiro
07-01-2002, 11:08 AM
GCC. You can download many ports of GCC, which enables you to compile your software for many OS'es. I use it for Windows, QNX, Linux, Solaris and OS9000. You can also cross-compile with GCC, which is compiling software for a different OS than the current.


Note that there are more compilers which can be used for cross-compiling and that kind of stuff. Maybe you could be a little bit more specific than just "what compilers can compile for operating systems other than Windows and DOS". For most OS'es, if not all, commercial and a lot of free OS'es, there are compilers and/or assemblers.