Thread: target OS compilers

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743

    target OS compilers

    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?
    My Website

    "Circular logic is good because it is."

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    It might get tricky with different file formats. I don't think Windows can store Linux files, let alone run them like you said.

  3. #3
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    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.
    My Website

    "Circular logic is good because it is."

  4. #4
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    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?)

  5. #5
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    I can compile windows executables with xmingw from Linux.
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  6. #6
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Why not uploading several versions, for different OS'es? You can use cross-compilers to compile for different targets.

  7. #7
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    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.
    My Website

    "Circular logic is good because it is."

  8. #8
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    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.

    [edit]
    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.
    [/edit]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Detecting if OS is Windows???
    By Ktulu in forum Windows Programming
    Replies: 2
    Last Post: 11-19-2006, 02:49 AM
  2. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  3. a simple OS
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 06-06-2004, 10:47 PM
  4. download compilers for mac os?
    By Shadow12345 in forum C++ Programming
    Replies: 1
    Last Post: 06-06-2002, 08:44 AM
  5. How do they compile code for an OS ?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 49
    Last Post: 03-28-2002, 12:16 AM