Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Is there a compiler that can compile a program for OS X, Windows, and Linux? At Least OS X and Windows?

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    The above answerer is mostly correct. However, there are a few nits.

    Cigwyn is a Unix emulator which runs GCC. DevC++ from Bloodshed software is GCC for windows which also runs on a Unix emulator (mingw). GCC is a product of the free software foundation and as such it is available for free from either place. It's not safe to assume that Windows will run a Linux executable without an emulator.

    TheFreeCountry.com lists an integrated package for the MacOs called Apple XCode. As they say, "You need to be an Apple Developer Connection (ADC) member to get the tools, but it appears that online membership is free." It includes GCC.

    For older macs CodeWarrior takes most ansi C++ input.

    And of course Java is OS independent by design.

    I didn't include any Linux information (and I am on Linux) because Linux uses GCC C Libraries so most distros come with it already and you can look at the documentation on your system to learn how to use it (though in Ubuntu you have to download it by typing "sudo apt-get install build-essential" while connected to the internet.)

  • 1 decade ago

    Well both OSX and Linux are UNIX based, so gcc or g++ or most standard UNIX compilers will create programs run on both Linux and OSX. Most of these executables will run on windows as well, and Cygwin is a windows compiler that will compile programs that should work for other OS's.

    Java is OS independent and will run on all 3 OS's

Still have questions? Get your answers by asking now.