OOPortal OOPortal
Programming C++  «Prev  Next»
Lesson 5 C++ compilers
Objective Course supports differences in C++ compilers.

Differences in C++ Compilers

This course supports the differences in C++ compilers.
The code in this course is written in ANSI C++ and should compile without errors on many ANSI-compliant compilers. ANSI C++, however, is a rapidly evolving standard and many older compilers are not able to use the latest additions in the language.
For this reason, the code used in this course was written to run on as wide a variety of compilers as possible. The code has been tested using GNU gcc/g++ (Unix), Microsoft Visual C++ 4.0 (Windows), and Borland C++ 5.0 (Windows). If you are using another compiler, though, you may need to modify the code slightly to get it to compile.
Resolve any compiler-dependent coding problems by hacking the code. You may have to rely on the compiler vendor's support if compiling errors occur.
Key differences might exist in various compiler flags and library files. Keep this in mind when working through this course. Also, check the Compilers Discussion topic for more information on compilers.


I am often asked to recommend a C++ compiler. I do not make recommendations and I don't know every C++ compiler; there are too many in existence.
I recommend that people take standard conformance very seriously when considering a compiler. If you can, avoid any compiler that does not closely approximate the ISO standard or fails to supply a solid implementation of the standard library. The recent releases from all the major C++ vendors do that.
Most of these compilers are embedded in frameworks of software development tools and libraries. These frameworks, environments, and libraries can be most helpful, but do remember that their use can lock you into a single vendor and that some uses have significant run-time performance implications.
When looking for C++ on the web, you find that much of the information is "hidden" under various product names. I had more success finding C++ compilers using the search engine google.com than by going directly to vendors that I knew sold them. Here, I have chosen to list C++ implementations simply by the name of their provider, ignoring marketing labels.
Some compilers that can be downloaded for free (do check their conditions/licenses before attempting commercial use):
  1. Apple C++. It also comes with OS X on the developer tools CD.
  2. Bloodshed Dev-C++. A GCC-based (Mingw) IDE.
  3. Clang C++. A relatively new and very active development.
  4. Cygwin (GNU C++)
  5. Digital Mars C++
  6. Mentor Graphics - Lite edition.
  7. MINGW - "Minimalist GNU for Windows". Another GCC version for Windows including a free (non-GPL) w32api.
  8. DJ Delorie's C++ development system for DOS/Windows (GNU C++)
  9. GNU CC source
  10. IBM C++ for IBM power, System Z, Bluegene, and Cell.
  11. Intel C++ for non-commercial development
  12. Microsoft Visual C++ Express edition.
  13. Oracle C++.