<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Telluriuminc</id>
	<title>Code::Blocks - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Telluriuminc"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/Telluriuminc"/>
	<updated>2026-05-26T05:18:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler&amp;diff=6253</id>
		<title>Installing a supported compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler&amp;diff=6253"/>
		<updated>2010-01-25T02:48:47Z</updated>

		<summary type="html">&lt;p&gt;Telluriuminc: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
When you launch Code::Blocks for the first time, it will scan the system for any supported compilers. Once this scan has finished, Code::Blocks will have been correctly configured for any detected compilers. Code::Blocks will also have default configurations even for compilers that were not found.&lt;br /&gt;
&lt;br /&gt;
This article is a guide for obtaining, installing, and configuring the various compilers that Code::Blocks can use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
Once you've installed a new compiler, be sure to read the Compiler-neutral setup steps at the end of this article.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, Code::Blocks supports the following compilers in Windows:&lt;br /&gt;
* [http://www.mingw.org MinGW GCC C/C++ Free Compiler, including G77 (Fortran)]&lt;br /&gt;
** [http://www.cygwin.org Cygwin GCC C/C++ Free Compiler]&lt;br /&gt;
*** HOWTO: Use Cygwin 1.7 with Code::Blocks &lt;br /&gt;
* [http://mspgcc.sourceforge.net/ MSP430 GCC C/C++]&lt;br /&gt;
* [http://www.hightec-rt.com/ TriCore GCC C/C++]&lt;br /&gt;
* [http://www.hightec-rt.com/ PowerPC GCC C/C++]&lt;br /&gt;
* [http://msdn.microsoft.com/visualc/vctoolkit2003 Microsoft's Visual C++ Free Toolkit 2003]&lt;br /&gt;
* [http://www.borland.com/products/downloads/download_cbuilder.html Borland's C/C++ Free Compiler 5.5]&lt;br /&gt;
* [http://www.digitalmars.com/ Digital Mars Free C/C++ Compiler]&lt;br /&gt;
* [http://store.scitechsoft.com/product_info.php?products_id=37/ OpenWatcom Free C/C++ Compiler]&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device Free C Compiler (SDCC)]&lt;br /&gt;
* [http://www.intel.com/cd/software/products/asmo-na/eng/compilers/index.htm Intel C/C++ Compiler]&lt;br /&gt;
&lt;br /&gt;
=== MinGW/GCC ===&lt;br /&gt;
The official MinGW website is at [http://www.mingw.org mingw.org]. A MinGW-bundled version of the latest Code::Blocks release is available from the [https://www.codeblocks.org/downloads/5#windows Code::Blocks download page]. If you install this version, the GCC compiler will be automatically detected and set as the default. Also you can use the TDM's GCC/mingw32 Builds from [/index.php/topic,10508.0.html] or [http://www.tdragon.net/recentgcc/].&lt;br /&gt;
&lt;br /&gt;
'''Note''': In any case, if you don't install MinGW in C:\MinGW, you'll need to update the configuration of GCC in Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
==== Official MinGW.org ====&lt;br /&gt;
You can install '''MinGW''' yourself, by using an automatic downloader/installer or by downloading and unpacking the required packages by hand from [http://www.mingw.org mingw.org], here: [http://sourceforge.net/projects/mingw/files/].&lt;br /&gt;
&lt;br /&gt;
Packages required (suggested) for MinGW/GCC v3.4.5:&lt;br /&gt;
* Compiler:&lt;br /&gt;
** gcc-build-3.4.5-20060117-3.tar.gz&lt;br /&gt;
** gcc-core-3.4.5-20060117-3.tar.gz&lt;br /&gt;
** gcc-g++-3.4.5-20060117-3.tar.gz&lt;br /&gt;
* Components:&lt;br /&gt;
** binutils-2.19.1-mingw32-bin.tar.gz&lt;br /&gt;
** gdb-6.8-mingw-3.tar.bz2&lt;br /&gt;
** mingw32-make-3.81-20080326.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dev.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dll.tar.gz&lt;br /&gt;
** w32api-3.13-mingw32-dev.tar.gz&lt;br /&gt;
&lt;br /&gt;
Packages required (suggested) for MinGW/GCC v4.4.0:&lt;br /&gt;
* Compiler:&lt;br /&gt;
** gcc-full-4.4.0-mingw32-bin-2.tar.lzma&lt;br /&gt;
* Components:&lt;br /&gt;
** binutils-2.19.1-mingw32-bin.tar.gz&lt;br /&gt;
** gdb-6.8-mingw-3.tar.bz2&lt;br /&gt;
** mingw32-make-3.81-20080326.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dev.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dll.tar.gz&lt;br /&gt;
** w32api-3.13-mingw32-dev.tar.gz&lt;br /&gt;
&lt;br /&gt;
==== HOWTO: Use Cygwin 1.7 with Code::Blocks ====&lt;br /&gt;
Cygwin 1.7 changed the way symlinks were created and handled when invoked from a command prompt. I couldn't find a way to force CB to use a unix-link shell, but was able to find a work around when perusing the Cygwin mailing lists.&lt;br /&gt;
&lt;br /&gt;
The symptom would show up with a message similar to the one below:&lt;br /&gt;
&lt;br /&gt;
  Execution of 'g++.exe -Wall -fexceptions  -g     -c c:/dev/code/cb1/main.cpp -o obj/Debug/main.o' in 'c:\dev\code\cb1' failed.&lt;br /&gt;
&lt;br /&gt;
Executing the same command from the CMD.EXE prompt yields an &amp;quot;Access is denied&amp;quot; message. This was how I was able to track down why the issue occurred. For more info, see this cygwin mailing list thread: http://www.mail-archive.com/cygwin@cygwin.com/msg104088.html&lt;br /&gt;
&lt;br /&gt;
'''[[Solution]]'''&lt;br /&gt;
&lt;br /&gt;
The solution is to point your compiler and linker directly to the version of gcc and g++ that you want to use.&lt;br /&gt;
&lt;br /&gt;
In my case, I wanted to use gcc-4.exe and g++-4.exe and so, I went into Settings-&amp;gt;Compiler and Debugger-&amp;gt;Toolchain executables. There I changed the &amp;quot;C Complier&amp;quot;, &amp;quot;C++ Compiler&amp;quot; and &amp;quot;Linker for dynamic libs&amp;quot; to point to gcc-4.exe, g++-4.exe and g++-4.exe.&lt;br /&gt;
&lt;br /&gt;
After this, compilation and linking worked fine.&lt;br /&gt;
&lt;br /&gt;
It would also be a good idea to add an environment variable CYGWIN with a value of nodosfilewarning in Settings-&amp;gt;Environment-&amp;gt;Environment Variables. This eliminates the following (harmless) warning message:&lt;br /&gt;
&lt;br /&gt;
  MS-DOS style path detected: c:/&lt;br /&gt;
    Preferred POSIX equivalent is: /c&lt;br /&gt;
    CYGWIN environment variable option &amp;quot;nodosfilewarning&amp;quot; turns off this warning.&lt;br /&gt;
    Consult the user's guide for more details about POSIX paths:&lt;br /&gt;
      http://cygwin.com/cygwin-ug-net/using.html#using-pathnames&lt;br /&gt;
&lt;br /&gt;
==== (Unofficial) TDM - &amp;quot;Twilight Dragon Media&amp;quot; ====&lt;br /&gt;
These packages are called '''TDM's GCC/mingw32 Builds''' and can be obtained from [/index.php/topic,10508.0.html] or [http://www.tdragon.net/recentgcc/].&lt;br /&gt;
&lt;br /&gt;
Packages required (suggested) for TDM's GCC/mingw32 Builds v4.4.0:&lt;br /&gt;
...which can be found here: [http://sourceforge.net/projects/tdm-gcc/files/] under: TDM-GCC 4.4 series -&amp;gt; Previous Releases -&amp;gt; 4.4.0-tdm-1 (r2) SJLJ.&lt;br /&gt;
* Compiler:&lt;br /&gt;
** gcc-4.4.0-tdm-1-core-2.zip&lt;br /&gt;
** gcc-4.4.0-tdm-1-g++-2.zip&lt;br /&gt;
* Components:&lt;br /&gt;
** binutils-2.19.1-mingw32-bin.tar.gz&lt;br /&gt;
** gdb-6.8-mingw-3.tar.bz2&lt;br /&gt;
** mingw32-make-3.81-20080326.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dev.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dll.tar.gz&lt;br /&gt;
** w32api-3.13-mingw32-dev.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Microsoft Visual C++ ===&lt;br /&gt;
The official Visual C++ website is at [http://msdn.microsoft.com/en-us/visualc/default.aspx http://msdn.microsoft.com/en-us/visualc/default.aspx].&lt;br /&gt;
&lt;br /&gt;
Code::Blocks will work with any edition of Visual C++ since the 2003 edition (MSVC 7.1). The commercial editions of Visual Studio may require additional configuration in Code::Blocks to work correctly. You can also download the most recent &amp;quot;Express&amp;quot; edition of Visual C++ for free from [http://www.microsoft.com/express/vc/ microsoft.com/express/vc]. If you choose an &amp;quot;Express&amp;quot; edition of Visual C++, it is highly recommended that you also install Microsoft's Platform SDK in order to develop programs for Windows.&lt;br /&gt;
&lt;br /&gt;
=== Borland C++ Compiler 5.5 ===&lt;br /&gt;
NOTE: ''At some point, you will be asked to register with Borland and fill out a survey. Registration is free.''&lt;br /&gt;
&lt;br /&gt;
Go to [http://www.borland.com/products/downloads/download_cbuilder.html# Borland's downloads] and click on the link labeled &amp;quot;Compiler&amp;quot;. After you accept the license agreement, you will be provided with download links to the setup file.&lt;br /&gt;
&lt;br /&gt;
=== Digital Mars C/C++ Free Compiler ===&lt;br /&gt;
Go to [http://www.digitalmars.com/download/dmcpp.html DigitalMars]. Accept the license agreement and you'll be redirected to a page containing download links. &lt;br /&gt;
&lt;br /&gt;
In that page, download:&lt;br /&gt;
*The '''Digital Mars C/C++ Compiler''' (&amp;lt;tt&amp;gt;dm8**c.zip&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*The '''Basic Utilities''' (&amp;lt;tt&amp;gt;bup.zip&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*The '''STLport''' library (&amp;lt;tt&amp;gt;stlport.zip&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;tt&amp;gt;dm\bin\sc.ini&amp;lt;/tt&amp;gt; in a text editor, and replace the line&lt;br /&gt;
 INCLUDE=&amp;quot;%@P%\..\include&amp;quot;;&amp;quot;%@P%\..\mfc\include&amp;quot;;%INCLUDE%&lt;br /&gt;
with&lt;br /&gt;
 INCLUDE=&amp;quot;%@P%\..\stlport\stlport&amp;quot;;&amp;quot;%@P%\..\include&amp;quot;;&amp;quot;%@P%\..\mfc\include&amp;quot;;%INCLUDE%&lt;br /&gt;
&lt;br /&gt;
=== Intel C++ Compiler ===&lt;br /&gt;
Please note that on Windows platform, Intel C/C++ compiler requires ''Microsoft Visual C++[http://www.microsoft.com/express/download/offline.aspx]'' to be present in your system in order to function properly. It will not compile any C++ program without it. You should also note that ''Windows SDK[http://www.microsoft.com/downloads/details.aspx?FamilyID=e6e1c3df-a74f-4207-8586-711ebe331cdc&amp;amp;DisplayLang=en]'' shall be installed in order to compile Windows app.&lt;br /&gt;
&lt;br /&gt;
Code::Blocks (C::B) is now able to detect (from svn revision 4967 onwards) Intel C/C++ compiler and it'll then automatically setup the MSVC compiler so that the Intel compiler works as intended. However if you wish to manually install the Intel C/C++ compiler, then follow the following steps.&lt;br /&gt;
&lt;br /&gt;
* Go to '''Settings &amp;gt; Compilers and debuggers''' and then select '''Intel C/C++ compiler'''.&lt;br /&gt;
* Click on the '''Toolchain executables''' tab. Point to the installation directory, e.g. &amp;lt;tt&amp;gt;C:\Program Files\Intel\Compiler\C++\10.1.020\IA32&amp;lt;/tt&amp;gt; , inside the ''Compiler's installation directory'' textbox.&lt;br /&gt;
* Click on the '''Additional Paths''' tab and fill in the directories pointing to MSVC bin directory and the Windows SDK directory. It may look like-&lt;br /&gt;
 C:\Program Files\Microsoft Visual Studio 8\VC\bin&lt;br /&gt;
 C:\Program Files\Microsoft Visual Studio 8\Common7\IDE&lt;br /&gt;
 C:\Program Files\Microsoft SDKs\Windows\v6.0\bin&lt;br /&gt;
* Click on the '''Search directories''' tab and add the include directories containing headers offered by Intel C/C++ compiler, MSVC compiler and the Windows SDK headers to '''Compiler''' and '''Resource compiler'''. It may look like-&lt;br /&gt;
 C:\Program Files\Intel\Compiler\C++\10.1.020\IA32\include&lt;br /&gt;
 C:\Program Files\Microsoft Visual Studio 8\VC\include&lt;br /&gt;
 C:\Program Files\Microsoft SDKs\Windows\v6.0\Include&lt;br /&gt;
* Click on the '''Linker''' tab under '''Search directories''' tab and add the directories containing libraries offered by Intel C/C++ compiler, MSVC compiler and the Windows SDK. It may look like-&lt;br /&gt;
 C:\Program Files\Intel\Compiler\C++\10.1.020\IA32\lib&lt;br /&gt;
 C:\Program Files\Microsoft Visual Studio 8\VC\lib&lt;br /&gt;
 C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button to save the settings. Now you should be able to use Intel C/C++ compilers on Windows with C::B.&lt;br /&gt;
&lt;br /&gt;
Note: The directories specified above may be different on your PC.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, Code::Blocks supports the following compilers in Linux:&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC C/C++ Free Compiler]&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device Free C Compiler (SDCC)]&lt;br /&gt;
* [http://www.intel.com/cd/software/products/asmo-na/eng/compilers/index.htm Intel C/C++ Compiler]&lt;br /&gt;
&lt;br /&gt;
=== Downloading the GNU GCC compiler &amp;amp; GDB debugger ===&lt;br /&gt;
&lt;br /&gt;
Under Linux you'll, most probably, already have everything that is needed in order to compile. All major Linux distributions (RedHat, Debian, SuSE, Mandriva, Gentoo, ArchLinux, etc) come with GCC &amp;amp; GDB preinstalled. To make sure you have have gcc installed, go to your terminal and type 'gcc -v'. In case you have GCC installed, you will get GCC's compile options and version number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
The Mac OS X port efforts has began recently, but it should be a matter of time until these compilers will be supported:&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC]&lt;br /&gt;
* [http://www.intel.com/cd/software/products/asmo-na/eng/compilers/index.htm Intel Compiler beta (not yet released to public)]&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device C Compiler (SDCC)]&lt;br /&gt;
&lt;br /&gt;
=== Downloading the GNU GCC compiler &amp;amp; GDB debugger ===&lt;br /&gt;
&lt;br /&gt;
Under Mac you'll need to install Xcode Tools from http://developer.apple.com/tools/&lt;br /&gt;
&lt;br /&gt;
This will install Apple versions of:&lt;br /&gt;
&lt;br /&gt;
http://www.gnu.org/software/gcc/&lt;br /&gt;
http://www.gnu.org/software/gdb/&lt;br /&gt;
http://www.gnu.org/software/make/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compiler-neutral setup steps ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;Next&amp;quot; all the way and you 're done.&lt;br /&gt;
&lt;br /&gt;
If you installed the compiler on its default installation directory, there is nothing more to configure. Launch Code::Blocks and you 're all set :)&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
If your compiler was not auto-detected, go to &amp;quot;Settings-&amp;gt;Compiler and Debugger-&amp;gt;Global Compiler settings-&amp;gt;Toolchain executables&amp;quot;, select the compiler you installed and press &amp;quot;Auto-detect&amp;quot;.&lt;br /&gt;
If you get a message saying that the compiler was auto-detected, congratulations!&lt;br /&gt;
If not, then press the button with the three dots next to the &amp;quot;Auto-detect&amp;quot; button and select the installation directory of your compiler manually.&lt;br /&gt;
&lt;br /&gt;
NOTE: ''The compiler's installation directory is exactly this: the installation directory. Not the &amp;quot;bin&amp;quot; subdirectory nor any other.''&lt;br /&gt;
&lt;br /&gt;
== Remote Compilation ==&lt;br /&gt;
Remote compilation is not directly supported by Code::Blocks, however, the following articles explain two remote compilation systems, which use 3rd party programs to provide this funcionality:&lt;br /&gt;
&lt;br /&gt;
[[Installing Uniwin remote compiler]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Using Xming for remote compilation]]&lt;/div&gt;</summary>
		<author><name>Telluriuminc</name></author>
	</entry>
</feed>