Free C/C++ Compilers

Compilers, cross-compilers, interpreters for ANSI C and ANSI C++


Free C/C++ Compilers and Interpreters

C is a general purpose procedural programming language that is fairly easy to learn (in that it doesn't have many built-in features to memorize) but is nonetheless sufficiently expressive that it can be used to build any sort of computer program, including whole operating systems like Linux. C++ is a general purpose object-oriented programming language that was originally created as a superset of C (although nowadays the two languages have developed in different directions so that this is no longer strictly true). These two programming languages, C and C++, are probably among the most popular languages used to write programs.

This page lists numerous free C and C++ compilers, cross-compilers and interpreters for a wide variety of operating systems on PCs, Macs and other computers.

If you are looking for C/C++ compilers and cross-compilers for microcontrollers, PDA, calculators (like the HP calculators) and other such devices, you should also check the Free C/C++ Compilers and Cross-Compilers for Microcontrollers, Embedded Systems, PDA, Calculators and Other Devices page. Most of the compilers that can be safely classified under that category has been moved to that page.

Related Pages

Free C, C++ Compilers and Interpreters for Computers

MinGW-w64 New

Like MinGW (listed elsewhere on this page), the MinGW-w64 project provides the libraries, headers and runtime needed for the GNU C and C++ compilers to run on a Windows system. In the case of MinGW-w64, these support files allow you to create 64 bit programs in addition to 32 bit ones. The project also provides cross compilers, so that you can compile (say) a Windows program from a Linux system if you choose.

Microsoft Visual Studio Express 2013

Visual Studio 2013 Express comes in a few flavours ("flavors" if you use US English). You will need the "Windows Desktop" version if you are developing Windows desktop programs or the "Windows" version for creating Windows Store apps. If you are writing programs for Windows Phone 8.0 and/or 7.5, you will need to use the earlier Visual Studio Express 2012 for Windows Phone. The entire package comprises an integrated development environment (IDE), compilers for C++, C# and Visual Basic. Like Visual Studio Express 2012, this version needs Windows Vista, 7, 8, 8.1, Windows Server 2008 R2 SP1, Server 2012 or above for your development machine. That is, if you need to develop on Windows XP and below, you will need to get Visual Studio Express 2010. Note that the Express version does not include all the tools and features of the full Visual Studio, such as the full MSDN library (the version included in Visual Studio 2012 Express is the MSDN Essentials Library), resource editor, macro assembler, etc. WARNING: this version of Visual Studio Express requires you to register for a Microsoft account, and associate your installation with this account, otherwise you will only be able to run the program for 30 days.

AMD x86 Open64 Compiler Suite

This is a version of the Open64 compiler suite (see elsewhere on this page) that has been tuned for AMD processors (and has additional bug fixes). The C/C++ compiler conforms to the ANSI C99 and ISO C++ 98 standards, supports inter-language calling (since it has a Fortran compiler available as well), x86 32 bit and 64 bit code generation, vector and scalar SSE/SSE2/SSE3 code generation, OpenMP 2.5 for shared memory models, MPICH2 for distributed and shared memory models, IEEE 754 floating point support, an optimizer that supports a huge variety of optimizations (global, loop-nest, inter-procedural analysis, feedback-directed, etc), etc. It comes with an optimized AMD Core Math Library and documentation. This compiler suite requires Linux.

Microsoft Visual C++ 2010 Express

The free Microsoft Visual C++ 2010 Express, along with the rest of the Microsoft Visual Studio 2010 Express suite of programs, is available free of charge directly from Microsoft. The software includes an integrated development environment (IDE) that allows you to create programs for the .NET framework (including .NET Framework 4) as well as native Windows (Win32) programs. The new version of the C++ compiler included in this package has some language features from the upcoming C++0x standard such as lambda expressions (to support function objects), rvalue references, auto (now with a different meaning from its C version and earlier C++ standards), static_assert (testing assertions at compile time), nullptr and decltype. Note that this free version lacks some of the features provided in the full (commercial) Visual Studio, such as MFC, ATL, the Windows resource editor, a macro assembler, etc. (I'm not sure if the other major new feature of the 2010 release, the inclusion of parallel programming libraries and tools, is in the Express edition or not.)

Open Source Watcom / OpenWatcom C/C++ Compiler

The Watcom C/C++ compiler (now OpenWatcom C/C++ compiler) is now open source and free. This compiler, which generates code for Win32, Windows 3.1 (Win16), OS/2, Netware NLM, MSDOS (16 bit and 32 bit protected mode), etc, was a highly coveted compiler some years back (until Sybase terminated it). The compiler also includes the rather well-known STLport (a C++ Standard Template Library implementation).

Digital Mars C/C++ Compiler (Symantec C++ Replacement)

Digital Mars C/C++ is a drop-in replacement for the Symantec C++ compiler, with support for compiling programs for Win32, Windows 3.1, MSDOS, and 32-bit extended MSDOS. If the target machine does not have a floating point processor (pre-Pentium machines), you can link the floating point emulation into your program. The compiler supports the C++ definition found in The Annotated C++ Reference Manual (ARM) and the enhanced language features of AT&T version 3.0, including templates, nested classes, nested types, exception handling, and runtime type identification.

UPS Debugger (C Interpreter)

This is actually a graphical source level debugger for X Window, but it contains a built in C interpreter which can handle single or multiple source files. You can use it to build a byte-code executable and execute the interpreter on that executable. If you need an interpreter to debug or prototype programs, or to just learn the language, check this out. It supports the following platforms: Solaris, SunOS, Linux, FreeBSD, BSD/OS, and possibly other Unices.

The BDS C Compiler

Remember the old (famous) BDS C compiler for 8080/Z80 CP/M systems? It is now in the public domain, complete with assembly language source code. The package is the retail version of the compiler, with a linker and user manual. Before you scoff at this, remember that it can be used to generate 8080/8085/Z80 code for embedded systems with a little bit of work (ie, write your own routines to replace any runtime library code that access the operating system functions).

Bloodshed Dev-C++ C++ Compiler

This is a Win32 integrated development environment that includes the egcs C++ compiler and GNU debugger from the Mingw32 environment together with an editor and other facilities to make program development using the Mingw32 gcc compiler easier on a Windows platform. It also includes an installer for your applications.

Turbo C 2.01

The old but famous Turbo C 2.01 for DOS is available for free from the new owners of the (formerly) Borland development tools. This was a well-loved compiler from the MSDOS days, known for its fast compilation times, integrated development environment ("IDE"), and (DOS-based) graphics library.

Orange C Compiler

Orange C Compiler is an optimising ("optimizing" if you use other variants of English) C compiler that supports the latest C standards like C99 and C11. It runs on Windows as well as DOS, has an integrated development environment with a programming editor (featuring syntax highlighting and code completion), make utility, debugger and a Win32 resource editor. It can generate programs for Win32 and MSDOS, as well as Intel and Motorola hex files (which is useful if you write programs for embedded systems). For MSDOS output, your programs will use a DOS extender. The author of this program also produces the CC386 compiler, which is also listed on this page.

PCC - Portable C Compiler

PCC is based on the original Portable C Compiler by S C Johnson. The goal of the project is to write a small, fast C compiler that can compile C99 source code. The compiler is a two-pass compiler that runs on OpenBSD and NetBSD.

DeSmet C

DeSmet C will be familiar to those who programmed in C in the 1980s. It is an MSDOS C compiler. It has been released under the GNU GPL, and comes with manuals, an editor, and a third party optimizer.

Apple Xcode for Mac OS X

Xcode is Apple's integrated development environment which includes a syntax-highlighting editor, a build control system, a debugger, the GNU C compiler (gcc), an interface builder, AppleScript Studio, Java development support, WebObjects development tools, etc. You need to be an Apple Developer Connection (ADC) member to get the tools, but it appears that online membership is free.

Tiny C Compiler - Smallest Linux C Compiler

This small Linux and Windows C compiler generates optimized x86 native binaries. It purportedly compiles, assembles and links several times faster than GCC. The compiler is currently moving towards ISO C99 compliance. It also includes an optional bounds checker. It also handles C script files (just add the shebang line "#!/usr/local/bin/tcc -run" to the first line of your C source code file on Linux to have it executed directly). TCC is distributed under the GNU General Public License.

Portable Object Compiler

This is a set of Objective C class libraries and a compiler that translates your Objective C code to plain C code. It works on Windows, Linux, OS/2, Macintosh, etc.

Mingw32 C & C++ Compilers

This system comes with the GNU C/C++ compiler, which you can use to generate Win32 executables. It has its own <windows.h> which is in the public domain. Applications generated using this system are supposed to be faster than those generated by the Cygwin32 system (see elsewhere on this page), and they are free from the encumberances of the GNU license. Like other systems based on the GNU tools, Mingw32 comes with complete with various programming tools, such as a program maintainence program (ie, make), text processing tools (sed, grep), lexical analyser generator (flex), parser generator (bison), etc. It also comes with a resource compiler, allowing you to compile your Windows resources.

GNU C/C++ Compiler

This is the GNU C compiler page, from which you can get links to binaries and source code for the GNU C Compiler. You can also use our links on this page for the most commonly requested binary versions (MSDOS and Win32).

Pelles C Compiler

This is another Windows-hosted C compiler that is based on LCC (see also LCC-Win32 elsewhere on this page). It contains a C compiler, linker, resource compiler, message compiler, a make utility, etc. It compiles code for both Windows and Pocket PC.

Compaq C Compiler

Linux/Alpha users can now download and use Compaq's optimising C compiler freely by simply filling a form and agreeing to their license agreement. The compiler may be used to generate any sort of program, commercial or otherwise. The compiler includes a math library and a debugger (ladebug) ported from True64 Unix. It comes with the usual man pages as well as a Language Reference Manual and a Programmer's Guide.

Ch Embeddable C/C++ Interpreter (Standard Edition)

Ch is a C/C++ interpreter that supports the ISO 1990 C Standard (C90), major features in C99 (complex numbers, variable length arrays or VLAs, type generic functions, the "long long" data type, etc), classes in C++, and extensions to the C language like nested functions, string type, etc. It can be embedded in other applications and hardware and used as a scripting language. Your C/C++ code is interpreted directly with no compilation to intermediate code. Since it supports Linux, Windows, MacOS X, Solaris and HP-UX, it means that your code should be portable to any of those platforms once you write it for this compiler. The standard edition is free for personal, academic and commercial use. You need to register to download the package.

DJGPP C and C++ Compilers

This is a development system based on the well-known GNU C/C++ compiler. It generates 32 bit MSDOS executables that is Windows 95 long-filename-aware. It is a very complete system with IDEs, graphics libraries, lexical analyser generators (flex), parser generators (bison), text processing utilities (like grep, sed), a program maintainence utility (ie, make), a dos extender, and so on. The compiler, utilities and libraries come with source code.

Cilk ANSI C Based Compiler

Cilk is an ANSI C-based language that can be used for multi-threaded parallel programming. It "is especially effective for exploiting dynamic, highly asynchronous parallelism in data-parallel or message-passing style". Their website mentions that Cilk has already been used to develop three world-class chess programs, StarTech, Socrates and Cilkchess.

Sphinx C-- Compiler

This MSDOS compiler is a sort of hybrid C compiler and assembler that allows you to "create programs with the power and readability of C while retaining the efficiency of assembly language." It can produce MSDOS executables or .OBJ files which you can use in conjunction with other linkers to generate an executable. The above link leads to the source code and documentation for the compiler. If you want a precompiled binary, you can get it from the Unofficial Sphinx C-- Compiler site.

LSI C-86 C Compiler

The website for this compiler is written in Japanese which unfortunately is not displayed correctly in my browser (I don't have the necessary fonts), so I'm not able to comment for certain about this compiler. It looks like a cross-compiler that allows you to generate ROMable code. An older version (3.30c) of the compiler appears to be free. The free version runs on MSDOS only.

ACC C Compiler

This is an MSDOS compiler that handles a subset of the C language with some extensions (eg the #asm directive for inline assembler). Floating point is not supported. It generates protected mode 32 bit assembler code, which you will have to assemble and link using the supplied A86 assembler and linker. A copy of the DOS extender will also be embedded into your application.

CINT C and C++ Interpreter

This is a C/C++ interpreter that comes with source code. It can be compiled and used on a large variety of Unices, including HP-UX, Solaris, SunOS, AIX, Alpha/OSF, FreeBSD and Linux, as well as Windows NT. You can even issue system calls from the interpreter (such as Posix calls on Unix or Windows API calls from Windows). It accepts most of K&R and ANSI C and is close to the standard C++ (at the time of this writing). As with all interpreters, it may be useful in debugging programs or learning the language.

SDCC C Cross-compiler

This is a C cross-compiler that targets the Intel 8051, DS390, Z80, HC08 and PIC microprocessors. It can also be retargetted for other 8 bit MCUs or PICs. It comes with a retargetable assembler and linker, a source level debugger and a simulator, and it is capable of a variety of optimisations. The libraries are Standard C99 compatible. Source code for the compiler is available under GPL. Host platforms supported include Linux, Windows, Mac OS X, Alpha, Sparc, etc.

LADSoft CC386 C Compiler

This is an ANSI C compiler for MSDOS/DPMI and Win32 that comes with a runtime library, linker, rudimentary debugger, DOS extender (MSDOS version), an IDE (Win32 version) and a make utility. Source code is also available. It compiles most of the C99 constructs when ran in C99 compatibility mode.

Cygwin Project (C & C++ Compilers)

This "project" includes a commercial quality compiler (GNU C/C++) that generates Win32 GUI and console applications. I have not used this port myself, but based on what I read, it appears that they have their own <windows.h> and so on. Source code for the compiler, libraries and tools are provided. Note that the default option in this package forces you to distribute your source code if you compile and link with their libraries. There is also a special option that you can invoke which will cause it to link with alternative libraries, allowing you to distribute your applications without sources.

LCC-Win32 C Compiler

This is a C compiler that generates Win32 GUI and console applications. It comes with its own linker, IDE, debugger, resource editor and resource compiler. LCC-Win32 is based on the LCC compiler (see elsewhere on this page) and is free only for non-commercial use.

LCC - A Retargetable Compiler for ANSI C

LCC is a C compiler (source code only) that generates code for the Alpha, Sparc, MIPS R3000 and Intel x86. There is also a book A Retargetable C Compiler written by the authors of the compiler that explains the code of the C compiler. This compiler is the basis of at least 2 other Win32 C compilers (also listed on the Free C/C++ Compilers & Interpreters page).

Cyclone C

Cyclone C is not strictly an ANSI C compiler but a compiler of a "safe dialect" of C. It enforces type safety, has a variety of checks to protect against buffer overflows, array-bound violations, etc. It currently works on Linux and Windows (the latter via Cygwin), and requires you to have the GNU compiler tools on your system (see elsewhere on this page).

Leonardo IDE

Leonardo IDE is a Macintosh-based IDE, compiler and debugger for C programs. It has a syntax highlighting editor, an ANSI C compiler, a compiler for the ALPHA visualization language, a graph editor, a reversible virtual CPU, etc. Note that the programs are not compiled to native code but to code to be executed for the virtual CPU. The virtual machine and debugger allows you to execute code forwards and backwards and supports multitasking. The IDE comes with animated algorithms, plus example source code for games like Tetris, Checkers, etc. The IDE is useful for checking and debugging your source code, search for memory leaks, etc. Note: this project has been discontinued.

Open64 Compiler Tools

Open64 comprises optimizing compilers for C, C++, and Fortran 90/95 for Intel Itanium systems running Linux. The compiler is the successor to the SGI Pro64 compiler suite, now released under the GNU GPL.

Related Pages

Can't Find What You're Looking For?

Search the site using Google.

Newest Pages

Popular Pages

How to Link to This Page

It will appear on your page as:

Free C/C++ Compilers and Interpreters

 

thefreecountry.com Free Programmers, Webmasters and Security Software

 


 

thesitewizard.com: Free Webmaster Tutorials, Scripts and Articles

HowtoHaven.com: Free How-To Guides

thefreecountry.com: Free Programmers, Webmasters and Security Resources
If you find this site useful, please link to us.