2/6/15, 07:41
Contents
1 Installing MinGW
2 Installing the wxWidgets Source Code
3 Checking make Version
4 Building wxWidgets
5 Compiling Code::Blocks
5.1 Setting up paths
5.2 Post compilation steps
Installing MinGW
Directions to install MinGW for Code::Blocks can be found here. MinGW installation
Page 1 of 3
2/6/15, 07:41
compilation will fail. Thus, if you have MSYS installed, ensure that <MSYS>\bin is not in your path before
compiling wxWidgets. wxWidgets must be compiled from a "regular" command line (like cmd.exe), not from
a Unix-like shell. The same problem could arise if Cygwin is in the path.
NOTE: For the remainder of these instructions we call the MinGW directory <MINGW>. You have to change
it to your corresponding directory (e.g. "C:\MinGW").
Building wxWidgets
To compile wxWidgets, open the command prompt window and change to the wxWidgets directory:
cd /D <WXWIN>\build\msw
SET PATH=<MINGW>\bin;<MINGW>\mingw32\bin
NOTE: Make sure you use exactly the same options for this step and for the build step below. The clean
target uses these variables and only cleans the specified version of the generated object and library files. (It
will not clean the intended files if these variables are not identical.)
NOTE: If you still have problems with compiling after cleaning, you could try to manually remove the
gcc_msw directory under the build\msw directory. This directory is the place where the object files are stored.
When everything is clean you can start compiling wxWidgets:
mingw32-make -f makefile.gcc
NOTE: These options are the officially-supported Code::Blocks options. If you want another version of
wxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big
http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes
Page 2 of 3
2/6/15, 07:41
Compiling Code::Blocks
Setting up paths
Before finally compiling Code::Blocks itself, you need to setup the paths:
Open the Code::Blocks project (CodeBlocks.cbp).
It will ask you to define a Global variable
Set the path to where you have wxWidgets installed (e.g. "c:\wxMSW-2.8.6-1\wxWidgets-2.8.6").
Compile Code::Blocks.
http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)&printable=yes
Page 3 of 3