CodeBlocks MinGW FAQ         FAQ for Ogre SDK Code::Blocks + MingW + STLPort

%prevogre%

CBsplash.jpg

FAQ for Ogre SDK Code::Blocks + MingW + STLPort


Can I use MinGW gcc versions older than gcc 3.4.5?


The short and simple answer is NO.

The long answer is an excerpt from the MinGW gcc 3.4.5 release notes:

This release also incorporates a patch to fix a bug in the (undocumented

and win32-specific) feature of allowing exceptions to cross dll-exe

boundaries. The patch changes the structure used to share pointers to

global exception data and so introduces an ABI-incompatibility with

earlier gcc-3.4.x releases. This means that for C++ code that needs to

throw exceptions across dll boundaries, both exe and dll must be

compiled with the same version of gcc.


An example is Dev-cpp which installs MinGW gcc 3.4.2. gcc 3.4.2 is not compatible with 3.4.5 builds when exceptions are being used. Ogre is made up of many dlls and does throw exceptions across dll boundaries.

See required Mingw Packages

Can I use the MinGW version that comes with Dev-Cpp?

The short and simple answer is NO.

See section above.

Also, the ld.exe that comes with Dev-cpp is very old and does not support linking directly to dll files. You must use binutils-2.16.91-20060119-1 or later.

Why do I get Link error: cannot find -lOgreMain OR Link error: cannot find -lOgreMain_d ?

During the link stage you get a link error message that -lOgreMain_d or -lOgreMain could not be found. If this occured just after installing Code::Blocks and building the Ogre demos then check the Code Blocks Compiler Setup.

If the Ogre samples build ok and you are getting the link error message when building your own app then check that the linker directory paths in the project target build options has an entry for where OgreMain.dll(Release build) or OgreMain_d.dll(Debug build) can be found. They should be in your bin\release(debug) directory.

Why use STLPort instead of libstdc++ v3 that comes with MingW?

read 'this'

==> DEPRECATED! Better read this !