Difference between revisions of "Installing a supported compiler"
Revision as of 13:39, 15 March 2005
Currently supported compilers, at the time of this writing are:
- GNU GCC (Linux)
- MinGW GCC (Win32)
- Microsoft's Visual C++ Free Toolkit 2003 (Win32)
- Borland's C++ Compiler 5.5 (Win32)
- DigitalMars (Win32)
When you launch Code::Blocks for the first time, it will scan the system for any supported compilers (it takes virtually no time). After this scan completes, Code::Blocks will have been configured for the found compiler(s). Code::Blocks will also be configured even for compilers that were not found (default installation settings will be used for each of those compilers).
For more info on how to download and install each of the above compilers, please read on.
Downloading the GNU GCC compiler & GDB debugger
Go to MinGW's downloads page and download the file named
MinGW-x.y.z.exe, where x, y and z are version numbers. At the time of this writing, this file is
MinGW-3.1.0-1.exe. If you consider yourself lucky, you might also try
MinGW-3.2.0-rc-3.exe. It's not a stable release yet, but it works and lacks some bugs the older version has.
These setup files contain everything needed to compile and debug windows programs.
Downloading the Microsoft Visual C++ Free Toolkit 2003
Go to this MSDN site and click on the link labeled "Download the Visual C++ Toolkit 2003". This will download the setup file.
NOTE: This download is not sufficient for building windows programs. You will also have to download and install the Microsoft Platform SDK...
Downloading the Borland C++ Compiler 5.5
NOTE: At some point, you will be asked to register with Borland and fill out a survey. Registration is free.
Go to Borland's downloads and click on the link labeled "Compiler". After you accept the license agreement, you will be provided with download links to the setup file.
Downloading the Digital Mars Free Compiler
NOTE: Code::Blocks support for DigitalMars was added in 1.0-beta6.
Go to DigitalMars. Accept the license agreement and you 'll be redirected to a page containing download links. Download the compiler (current version is 8.41). You might also want to download the resource compiler (in basic utilities), as well as the STLport.
Compiler-neutral setup steps
Now that you have downloaded the setup file of the compiler of your choice, launch its installation by double-clicking on the setup file. The actual installation process is really simple. Just press "Next" all the way and you 're done.
If you installed the compiler on its default installation directory, there is nothing more to configure. Launch Code::Blocks and you 're all set :)
If that is not the case, launch Code::Blocks. If it is the first time you launch it, the compiler auto-detection will be launched. If your compiler was not auto-detected, go to "Settings/Configure plugins/Compiler", select the compiler you installed, switch to the "Programs" page and press "Auto-detect". If you get a message saying that the compiler was auto-detected, congratulations! If not, then press the button with the three dots next to the "Auto-detect" button and select the installation directory of your compiler manually.
NOTE: The compiler's installation directory is exactly this: the installation directory. Not the "bin" subdirectory nor any other.