Code Blocks Compiler Setup         Setting up Code::Blocks compiler options



Using Ogre with Code::Blocks + MingW


The first time you run Code::Blocks you will get the dialogue pictured above.


No compilers are selected as the default, so select the gcc compiler. It is now the default compiler. Select OK and the Code::Blocks IDE should start up.


If you have several different MinGW versions installed, Code::Blocks will only select the first one it finds. For those migrating from Dev-cpp, this can be a problem, since Code::Blocks will probably find the Dev-cpp installation of MinGW before the one you just installed. The Dev-cpp installation uses MinGW 3.4.2 which will not work with the Ogre SDK.


Open up the Compiler/Debugger settings dialogue.


Make sure that the Compiler Installation Directory is set to your MinGW C++ Toolbox directory. You can use the little button to the right of the directory entry field to navigate to the correct directory. Also make sure that the paths in Search Directories settings are pointing to valid MinGW C++ Toolbox sub-directories.

If you have older MinGW installations or cygwin installed make sure that MinGW C++ Toolbox directory paths are positioned before any other mingw/cygwin paths in the PATH environment variable. The MinGW C++ Toolbox installer does not seem to correctly set the PATH environment variable so you will probably have to set it manually.