Willus.com Home   |   Archive
Win32 C/C++ Compilers
Willus.com's Win32/64 C/C++ Compilers Page
(Information about x86/AMD64/EM64T compilers)
Last updated Wednesday, 24-Feb-2010 07:47:42 CST

See the new Win32 C/C++ Compiler page layout.

OVERVIEW

These are my takes on some of the many C/C++ compilers to choose from for compiling 32-bit/64-bit Windows/Linux applications on x86/x86-64. The opinions expressed here are purely my own. I am not a professional compiler tester or even an expert, but I do a lot of programming for my job and for fun (mostly in C), and I am interested in compilers and performance. I do not take payments or endorsements from any compiler company or group, and I do not have the funds or the time to do thorough investigations of all compilers, particularly expensive commercial ones.

LATEST NEWS (for the latest news about this page).

The Compiler I Use
I use the MinGW compiler. I have been using it since September of 2002, and it has been extremely reliable (I have yet to find a compile bug when compiling any code--mostly C, but some C++ and FORTRAN 77). I still have the RSXNT C/C++/FORTRAN compiler and install instructions available from my web site, but RSXNT is no longer supported and doesn't have a web page. The author has moved on to other things.

Integrated Development Environments
I'm not a big user of integrated development environments (IDEs), so I'm not a good person to ask about which one to use. Give me a make file and a vi-like editor and I'm happy doing everything from the command line (and maybe the occasional batch file or C helper program). For links to free IDEs, try the MinGW IDE Wiki Page, or my Pelles C section.

Where to get Win32 Documentation
For Win32 API documentation, the best source for recent material is msdn.microsoft.com or just a search engine like google.com. The original lcc-win32 homepage has broken links to free (but quite old) Win32 API Documentation and a nice C tutorial, but you can find them by Googling win32hlp.exe at mirror sites like this.

Other Good C/C++ Compiler Links
For more C/C++ links, check the SOFTWARE DEVELOPMENT section of my Useful Computing Links page.

Useful Utilities
If you want to cut down the size of your .exe files, try the UPX EXE packer. It's a terrific little utility. Look for other great Win32 utilities on my Useful Software Page.

Thank You
I'd like to thank all of the people who send me e-mail to keep me updated on Win32 C/C++ compiler news. Want to tell me your opinion or give me an update? Send me e-mail.


LATEST NEWS

Feb 24, 2010 The mingw.org glitch was temporary. The address works again (they have changed hosters).
Jan 31, 2010 I got a chance to try out MinGW 64-bit on Windows 7. It worked well. Also, I have no idea how long it's been this way, but the www.mingw.org address no longer works. You have to go to the sourceforge page.
July 26, 2009 I've finally finished updating all of the compiler offerings. One interesting project I stumbled on recently is OpenCL, a C-based API for programming massively parallel systems like the NVIDIA Tesla.
May 31, 2009 I'm trying to work through these compiler pages and provide some long-overdue updates. I must admit I'm not as excited about Windows compilers as I used to be since I've stabilized on gcc 3.X, but with a planned upgrade to 64-bit Windows looming at both work and home, my interest will probably revive and have more focus on the 64-bit side.
April 21, 2009 GCC 4.4.0 released.
Mar 5, 2008 GCC 4.3.0 released.
Nov 11, 2006 My apologies for not finding the time to keep my compiler links more up to date. If you haven't visited the GCC benchmark page, it's worth a look. There are several plots that chart the results of the SPEC benchmarks on various systems daily with the very latest updates to GCC. GCC 4.2.0 should be getting very close to release.
Jul 16, 2006 I've finally taken the time to update some of the blurbs here. I hope to systematically do them all within the year, but I've updated GCC, Microsoft, Intel, Borland, and Pathscale for now.
Feb 28, 2006 GCC 4.1.0 has been released. This is good news for MinGW users since the MinGW philosophy has been to wait for 4.1.x before porting the GCC 4.x versions.
Oct 31, 2005 If you are curious about a gcc 4.x release under MinGW, you might want to check out this post from Danny Smith, or read the bit under "Milestones" written by Earnie Boyd on MinGW's spotlight page at SourceForge.
Jun 16, 2005 Intel released their v9.0 compilers, which are have new features to optimize code for multiple cores.
May 24, 2005 I added free and commercial sections for Ch, an interesting, cross-platform C/C++ interpreter from softintegration.com.
Apr 20, 2005 GCC 4.0.0 is released. This is a major new release from the gcc team. There is a Slashdot thread about the release. I have played with it just a little bit on a 2.2 GHz Opteron box, and on a sample of one code (BW1D C from my compiler benchmarks), it made little difference in compiled code run times, with the gcc 4.0.0 compiled executable running maybe 2-3% faster than the gcc 3.4.0 executable in 32-bit mode and virtually dead even in 64-bit mode.
Mar 18, 2005 I found this interesting ranking of computer languages while doing some googling a couple days ago.
Mar 15, 2005 Slashdot has a post discussing a C-Net news article which offers an informative preview of GCC 4.0. One of the newly posted features on GCC 4.0 is autovectorization, which should be very cool!
Feb 5, 2005 I've cleared up some mistakes in my lcc-win32 and Pelles C sections. My apologies to the authors of these compilers.
Jan 20, 2005 MinGW 3.2.0 (rc3) has been released. This is the complete MinGW environment install package and contains GCC 3.4.2 and the latest Win32 API package. It has jumped from 15 MB (MinGW 3.1.0) to 50 MB in size, partly because it now includes gcc-ada and gcc-java.
Nov 6, 2004 GCC 3.4.3 released.
Oct 8, 2004 With more 64-bit support coming out, I've added some qualifiers to the heading on this page and to my overview to indicate that I'm interested in x86/AMD64/EM64T compilers--not just Win32 compilers.
Other notes:
  -- Intel released v8.1 of their compilers with 64-bit support on Oct 4.
  -- GCC's next major release (was GCC 3.5) was renamed to GCC 4.0 on Sept 9.
  -- A comparison between Intel v8.1 and GCC 4.0 is here.
  -- GCC 3.4.2 was released on Sept 6, and the MinGW candidate has been available for download since Sept 23.
  -- I've updated my GCC, MinGW, and Intel sections.
June 25, 2004 I've updated my GCC section to discuss the exciting developments which are being implented into the next major release (3.5).
June 2, 2004 I've added a section for the Pelles C compiler and integrated development environment, a free package that I was notified about via an e-mail.
May 9, 2004 MinGW's GCC 3.4.0 candidate is now available.
May 5, 2004 I updated my Microsoft Free Compiler section with a link to their free optimizing Visual C++ compiler. Thank you to the person who pointed this out to me in an e-mail.
Apr 20, 2004 GCC 3.4.0 released. Hopefully a distribution for MinGW will follow soon.
Feb 24, 2004 GCC 3.3.3 released.
Dec 15, 2003 Intel has released v8.0 of their compilers.
Nov 21, 2003 Added a section in my commercial compilers list for the PGI commercial compiler.
Nov 18, 2003 They're not Win32, but Pathscale is introducing high performance compilers for the AMD64 architecture that they claim increase performance of executables by 40%.
Oct 17, 2003 Slightly modified my Overview section and added some links to other good C/C++ compiler sites.
Oct 10, 2003 I've started my own MinGW/Gnu C Tips page.
Sep 15, 2003 MinGW 3.1.0 based on GCC 3.2.3 released.
Sep 5, 2003 MinGW 3.0.0 based on GCC 3.2.3 released. You can also choose to download and install GCC 3.1.1 components from the same site if you want the latest version of GCC.
Sep 4, 2003 Open Watcom C/C++ and Fortran 1.1 released.
Aug 8, 2003 GCC 3.3.1 released.
May 14, 2003 GCC 3.3 released.
Feb 16, 2003 Watcom's Open C/C++ 1.0 (also with FORTRAN) was released on Feb 7.
Feb 16, 2003 I updated several sections this morning.
Feb 9, 2003 I've given this page a new look since the total amount of information was starting to be unwieldy. You can now see at a glance which sections I've recently updated. And if you prefer the older format, it's still here.
Jan 31, 2003 The Microsoft C/C++ Compiler for free? (Jan 17, 2003) What's gotten into Bill Gates?
Dec 3, 2002 Intel v7.0 compilers are out.
Sept 7, 2002 MinGW 2.0.0 based on GCC 3.2 has been released!
Jan, 2002 Here are my 2002 Win32 Compiler Benchmarks.

Free Compilers
About GCC (last update 6-3-2009)
Many of the free C compilers listed here are ports of GCC, which is the standard compiler that comes with all Linux distributions. GCC used to stand for the GNU C Compiler, but it now stands for the GNU Compiler Collection since it has grown to include front-ends for C, C++, Objective C, Fortran 95, Java, and Ada, as well as other front-ends. GCC is highly portable, very robust, and was started over 20 years ago by the Free Software Foundation (FSF). In fact, Richard Stallman, the founder of the FSF, published his thoughts on on the FSF after 20 years in 2004. GCC has been called "the most important piece of software in the world" by Arthur Griffith, author of GCC: The Complete Reference. As of this writing, GCC is at version 4.4.0, but the standard GCC included with MinGW is still just 3.4.5 (though you can get an alpha release of gcc 4.3 at the sourceforge MinGW download site.).

GCC 4.X
GCC version 4.X (first released 4-20-05, is a major overhaul of GCC. It includes Fortran 95 support, faster x87 math intrinsics from Uros Bizjak, autovectorization, and most significantly, a new, more all-encompassing way to represent the language being compiled called Static Single Assignment (SSA), which was merged into the main GCC development line on May 13, 2003. This method converts each high-level language into a common generic language tree which can then use a common optimizer across all languages. C-Net has put up a good preview article on GCC 4.0. By the way, for you Fortran fans, GCC compiles Fortran 77 and 95 (as of 4.X) directly to native assembler code now (it has for some time)--not to C code.

BENCHMARKS
GNU maintains a GCC benchmark page which has links to several independent benchmarks of GCC. Also see my Win32 Compiler Comparison or Scott Robert Ladd's GCC 4.0 Review for some more dated benchmark results. You can also get a gauge on how well GCC does by looking through SPEC benchmarks and checking the scores and the compilers used in each case (click on the "CPU 2006 Search Form" link near the bottom of the page).



Embarcadero (was Borland) (last update 5-31-2009)
Embarcadero is the latest owner of the original Borland C++ compiler as of July 2008 They still offer version 5.5 (released in August of 2000) of the Borland C++ compiler for free download, as well as a trial version of their latest commercial compiler.

The obvious downside is that this compiler dates back to 2000, but it does install painlessly and doesn't take up a lot of space on your hard drive, which is remniscent of Turbo C. In fact, if you are used to the old Borland Turbo C way of doing things, you should feel right at home with this compiler. This free version does not come with an integrated development environment (IDE). Everything must be done from the command line. Also, the license does not allow for commercial software development (i.e. you cannot sell the software that you develop with this compiler). The included documentation is thorough and easy to follow. Unfortunately, this free version of Borland's compiler generally produces the slowest running executables according to my Win32 Compiler Comparison



Ch (last update 5-31-2009)
Ch is a cross-platform, C/C++ interpreter from softintegration.com. It touts itself as "an embeddable C/C++ interpreter for cross-platform scripting, shell programming, 2D/3D plotting, numerical computing, and embedded scripting." I have not tried it, but the user testimonials page has some convincing endorsements. The standard edition is free for personal and commercial use. The professional edition, which has built-in plotting support, is $500 for non-academic use. There are also several toolkits for numerical analysis and web programming.


Cygwin (last update 5-31-2009)
The Cygwin Project provides a Linux-like environment for Windows, including the cygwin DLL and a ton of linux packages which have been ported to cygwin, including gcc 4.3.2. Cygwin and works with both 32-bit and 64-bit versions of Windows, though support for Windows Me/98/95 will be discontinued with v1.7.0 (in beta test as of 5-31-09). It is a very popular package for those wishing to port Linux apps to Windows.

If you do not have a lot of Linux experience and just want a Windows compiler, I do not recommend using Cygwin.



Digital Mars (last update 5-31-2009)
This is one of three free C compilers not ported from GNU C. It used to be Zortech C++ and then Symantec C++. Now it is the Digital Mars C/C++ Compilers by Walter Bright. This compiler (on v8.5 as of May 2009) has a reasonable footprint and installs painlessly, and, thanks to some quick work by the author, it flawlessly compiled all of the code in my Win32 Compiler Comparison. Digital Mars generates "Win32, Win16, DOS16 and DOS32" exe's (though the development environment is Win32 only). The Digital Mars web pages have lots of interesting links (e.g. Walter Bright's new D programming language), and they are worth checking out.


DJGPP (last update 6-3-2009)
Another port of the GNU-C compiler to MS-DOS is DJ Delorie's port, known as DJGPP (DJ's GNU Programming Platform). I used this compiler way back in the MS-DOS days before MS Windows took hold. It's strength is generating 32-bit DOS applications, but with RSXNTDJ (RSXNT for DJGPP), it can be used to create Win32 apps like EMX/RSXNT. The disadvantage (compared to EMX/RSXNT, for example) is that the compiler and other tools are distributed in MS-DOS 32-bit format instead of Win32 format, and this means that they run more slowly on a Windows 95/NT system. Go to DJ's web site for all kinds of information on GNU, C compilers, etc.


EMX/RSXNT (last update 6-1-2009)
RSXNT, developed by Rainer Schnitker, appears to be defunct. Rainer Schnitker's home page for his port of GNU C to Win32 has now gone missing, and he hasn't re-surfaced in a google search as of 2009. RSXNT is a solid port of GCC to the Win32 environment, but I started using MinGW32 instead back in September 2002. MinGW is actively supported. One advantage to RSXNT is the capability to create a single .exe file which will run in both native Win32 mode and in MS-DOS (with a couple of support files, and assuming that the code is a "console" application which has no Win32 calls). This simplifies code maintenance if you are developing for a mixed environment which includes some very old PC's. Otherwise, I would use MinGW.

Click here to get the RSXNT compiler (based on gcc 2.7.2) and install instructions from my web server. I've designed my distribution to have an install feel more like MinGW (a single directory tree rather than the three that Rainer had his distribution set up for).



Intel (last update 6-3-2009)
They're not Win32 compilers, but Intel does offer their Linux compilers (C, C++, and FORTRAN) and other Linux development tools to non-commercial developers free of charge. They are offering 11.0 as of May 2009. You have to provide an e-mail address to get the software, and it's only for non-commercial development. Read more about Intel in the commercial compilers column on this page.


Lcc-win32/64 (last update 6-4-2009)
Lcc-win32 is a Win32 C compiler based on lcc, a retargetable compiler authored by Christopher Fraser and David Hanson at AT&T. The lcc compiler was ported to Win32/64 and bundled with tools and documentation and called lcc-win32/64 by Jacob Navia. It is worth noting that lcc and lcc-win32 are different compilers and have different licensing agreements. Lcc is free for personal and commercial use, while lcc-win32/64 is free only for personal use.

The original lcc-win32 home page seems to have some broken links, but you can find mirror sites by Googling win32hlp.exe, for example, which lead me to this mirror in Germany, where you can find some of the 2003 downloads of lcc-win32, including the FORTRAN compiler. Navia now works for Q Solutions which offer up-to-date versions of lcc-win32 and lcc-win64 free for private use (as far as I can tell) or for sale for full commercial development. If the lcc-win32 licensing scheme doesn't appeal to you, you might try Pelles C, which is also based on lcc, offers Win32 and 64-bit versions, has no licensing restrictions, and comes with a free IDE as well. Q-solutions also offers an IDE (QIDE), but I believe it only comes with the version that you buy.

I tried lcc-win32 out briefly back on version 3.0. You can see performance results in my Win32 Compiler Comparison. It was easy to set up, had a small footprint, compiled code very quickly, and came with a nice text editor and a Win32 documentation file, though the Win32 doc file is quite old (1996) and does not include recent Win32 API's. (A better place for Win32 API's is msdn.microsoft.com.)



Microsoft (last update 6-4-2009)
Microsoft's offers free downloads at their Visual Studio Express Editions Download Page, which includes Visual C++ 2008 Express Edition, along with Visual Basic, C#, etc. The download page says this:

To get started today, select an Express Edition product from the list below. You should run WindowsUpdate to ensure your computer is up-to-date before you install any Express Edition. Remember, Express Editions are not the complete Visual Studio product, but are tools designed for students and hobbyists.

Hard-core hobbyists and professional developers should get a complete edition of Visual Studio. Free trials are available for download before you decide to buy.

... and this page talks about Visual C++ in particular ...

Visual C++ 2008 Express Edition provides a complete integrated development and debugging environment making it the easiest way to create powerful applications using the C/C++ language. Visual C++Express Edition also contains an enhanced version of the C/C++ optimizing compiler for the fastest executables. Best of all, the Visual C++ Express Edition is completely free!




MinGW-32/64 (last update 2-24-2010)
If you don't need the Linux/Unix API provided by Cygwin, you can get a GCC port from the MinGW Page for a "Minimalist" (i.e. not so unix-like and more Win32-like) implementation of GCC under Windows. Start with the MinGW Getting Started page. You can then download and install more recent individual components for GCC if you like, e.g. simply extract the non-source .tar.gz files from a more recent GCC candidate package from the Package List into the MinGW directory tree.

The GCC version standard with MinGW is still 3.4.5. MinGW has been slow to standardize on GCC 4.x because of regression issues between GCC and Windows. MinGW provides a GCC Release Status page maintained by Aaron W. LaFramboise.

A Win64 (64-bit) version of MinGW is also available on Sourceforge. I downloaded the sezero distribution, unpacked it into c:\mingw64, put c:\mingw64\bin in my path and re-named the .exe files to their small names and was off and running. The only issues I'm having are that the environment variable for the library path doesn't seem to work, and there is no crt_noglob.o file for those cases where I don't want command argument globbing (I haven't actually tested that), but I was still able to recompile thousands of lines of source in just a few minutes. Here are my first benchmarks under Windows 7.

I've been using MinGW (32-bit) as my main compiler since September 2002 (when I switched from RSXNT). MinGW comes with g77 for compiling FORTRAN 77, and version 4.x of GCC supports Fortran 95. I have my own MinGW/Gnu C Tips page with more information and good links about MinGW.

MinGW was spotlighted in 2005 by Sourceforge.



Miracle C (last update 6-4-2009)
The Miracle C compiler, authored by Tadeusz Szocik, isn't quite free and only compiles traditional ANSI C programs (it does not include any Win32 headers or libraries). But the shareware fee is only $19, it has a small footprint (1 MB), it installed and uninstalled flawlessly in Win XP, and it comes with an integrated development environment (workbench), so I thought it at least deserved a blurb.


Pelles C (last update 6-4-2009)
Pelles C is "a complete development kit for Windows and Pocket PC" centered around an optimizing C compiler based on lcc (not lcc-win32/64). Both Win32 and Win64 versions are available and are being actively maintained. I have yet to try it out, but the integrated development environment (IDE) screenshots on the website look pretty good. This is probably a very good choice for people who want to start programming Windows. Unlike lcc-win32/64, which is free for personal use, but not for professional use, Pelles C is free for both personal and commercial use since it is based on the original lcc. I have received several positive comments on it via e-mail, an example of which (from 12-5-04) is shown below (though I'm not sure why the need for a command box should be seen as a drawback ;-).

...I find [it] very useful. It compiles very fast executables and very tight code. Well-made project management completely eradicates the need for a command box, and yes, it does PocketPC, WinCE, and some other cell phones just fine (I have tested them on the actual systems). It has everything from DOS16, which I used for some time with Microsoft's QuickBASIC to make some fairly complex programs, to WIN64, which I have yet to test...I have to say it's the best compiler I've ever used (and I've used quite a few)...




Watcom (last update 6-4-2009)
Open Watcom C/C++ and Fortran is up to version 1.8 (February 2009) with support for DOS, Win32, Linux, and O/S 2. I have not had a chance to download and install it. Any feedback on it would be welcome. An excellent resource for Watcom's compiler is Paul Hsieh's Watcom C/C++ page.
Commercial Compilers
Embarcadero (was Borland) (last update 7-25-2009)
I used Borland back in my MS-DOS days when they made Turbo C, and that compiler was ahead of it's time--small footprint, fast, conformed to the latest ANSI standards, compiled everything flawlessly, and had lots of handy library functions for DOS programmers. It was only when I needed a clean 32-bit compiler that I switched to DJGPP's GNU C (see DJGPP section) in the late 1980's and early 1990's. Borland's compiler is now owned by Embarcadero as of July 2008 and is called C++Builder (2009 edition as of July 2009). There is a FAQ page and a product edition page. Prices for the professional, enterprise, and architect editions are $900, $2000, and $3500, respectively. A free version is still available--see the freeware compiler column.


Ch (last update 7-25-2009)
Ch (v6.1 as of July 2009) is a cross-platform, C/C++ interpreter from softintegration.com. It touts itself as "an embeddable C/C++ interpreter for cross-platform scripting, shell programming, 2D/3D plotting, numerical computing, and embedded scripting." I have not tried it, but the user testimonials page has some convincing endorsements. The standard edition is free for personal and commercial use. The professional edition, which has built-in plotting support, is $500. Ch supports Win32 and Win64 as well as several other platforms (linux, Mac OS X, Solaris). There are also several toolkits for numerical analysis and web programming.


CodePlay (last update 7-25-2009)
Founded in 1999, CodePlay continues to offer their VectorC compiler for Windows (v2.1) under their "Legacy Products" page. They have a FAQ page and a benchmark page for VectorC. Though the benchmark page is somewhat dated (I should talk!), it is interesting because it provides full source code plus the compiled assembler code for all of the examples. CodePlay also offers tools such as their Sieve C++ system which layers on top of VectorC to support multicore platforms. CodePlay VectorC also supports the Playstation 2 platform. The VectorC PC compiler has several prices, including professional ($800) and special ($80), which is presumably targeted at students and/or amateurs.


Comeau (last update 7-25-2009)
Comeau Computing offers a C++ front-end (v4.3.10.1 as of July 2008) which converts C++ to C, which is then compiled by a separate back-end. Currently, the Win32 port supports VC++ 7.0, Borland, Metrowerks, MinGW, lcc-win32 and Digital Mars backends. Comeau's C++ front end is also available on a wide number of other platforms, though support for Win64 is not mentioned, and many of the web pages seem a bit dated. The license runs $50. I have not tried it out.


Intel (last update 6-3-2009)
Intel's latest C++ compiler release is 11.0 and fully supports their latest processors. I have not tested it, but I have no doubt it performs well based on SPEC CPU benchmarks.


Lcc-win32/64 (last update 6-4-2009)
Jacob Navia, through Q Software Solutions, now offers commercial versions of lcc-win32 and lcc-win64. The prices run from 40 euros for the base system to 70 euros for the full system. The change log shows active development through 2009. I'm not sure what the difference between the commercial version of this product and the the freely downloadable version is, but it is pointed out in a couple of places that the free version is only for private use.


Freescale (was Metrowerks) (last update 7-26-2009)
The CodeWarrior Development Tools which used to be maintained by Metrowerks are now owned by Freescale, and support for a Windows version seems to have been dropped, though googling codewarrior for windows seems to come up with links where an older version can be downloaded for free.


Microsoft (last update 7-26-2009)
Microsoft's professional version of C/C++ for Windows is now called Visual Studio 2008 Professional and can be found along with their free Visual C++ 2008 Express Edition on their web download page. This seems far simpler than in the past, when they offered multiple flavors. The Visual Studio 2008 Professional goes for $550 as an upgrade and $800 when buying a full version. Note that I've benchmarked the older Visual C 6.0 in my (dated) Win32 Compiler Comparison.


PathScale (last update 7-26-2009)
The PathScale compilers (now owned by SiCortex) aren't explicitly for Win32 programming, but they do provide a high performance compiler suite for x64-based Linux systems. They claim to be the "highest-performance 64-bit C, C++ and Fortran compilers for Linux-based environments," and their SPEC scores are very good. Unfortunately, how to purchase of the Pathscale suite isn't obvious, since SiCortex is a hardware vendor. They say they ship the PathScale suite with their hardware, but don't seem to have a link for buying it separately.


PGI (last update 7-26-2009)
The Portland Group (PGI) offers a a compiler suite for Win32/64, Linux x32/x64, and Mac OS X. They are on Release 9.0 as of July 2009. Commercial single-seat prices are $420 for C++, $700 for FORTRAN, and $990 for both. Academic pricing is also available.

About willus.com This page last modified
Wednesday, 25-Aug-2010 22:21:38 CDT
News