Compilers that can build binary in both Linux and Windows

Compilers that can build binary in both Linux and Windows

I am using the WatCom Compiler to build the binary along with the Visual Studio 2005 IDE in Windows. Can you suggest another compiler that can build the binary in both Linux and Windows?

    Requires Free Membership to View

    When you register, my team of editors will also send you resources covering Linux administration and management; integration and interoperability between Linux, Windows and Unix; securing Linux and mixed-platform environments; and migrating to Linux.

    Cathleen A. Gagne, Senior Editorial Director

    By submitting your registration information to SearchEnterpriseLinux.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchEnterpriseLinux.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

You don't mention whether or not you use the C/C++ or Fortran compiler, so I'll assume you are using C. First you should be aware that there is work currently being done on Watcom for Linux. This link will give you instructions on how to install Open Watcom on Linux.

Have you looked at gcc, commonly associated with Linux or Unix? The gcw project (GCC for windows) is an attempt to port gcc to Windows. You can also look at installing Cygwin, which would give you a Linux-like environment for Windows. It acts as a Linux API emulation layer.

This was first published in September 2007