Compiling wxArt2D with CodeBlocks (non Unix fashion)

First read WxArt2dInstallCmake, the directory structure required is explained in there, not here.

You already have installed CodeBlocks with MingW integrated.

Download latest cmake, wxWidgets, and checkout from CVS wxArt2D.

wxWidgets install

The CodeBlocks twiki tells how we can compile wxWidgets from source.

Compile wxWidgest for CodeB

In short from within a DOS box (any other wxwidgest will do):

If you are not in a hurry, right away do all other:

Be carefull with the shared versions. Next with the same lines as above goto, and compile the stc library (PS newer version of wxWidgets already have this compiled in):

In the you will have compiled wxWidget libraries in:

And for shared:

wxArt2D

Open DOS box and set WXWIN variable. Next extend path to cmake binaries. After that start cmake-gui.

set WXWIN=c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10
PATH=c:\pathToCmake\cmake\bin:%PATH%

See WxArt2dInstallCmake topic for how to continue, directory structure etc. is explained there.

After starting cmake-gui, you will be asked for the type of generator. Choose "MinGW Makefiles" or the "CodeBlocks - MingW Makefiles". The last one in fact produces the same make files, but with added CodeBlock project file. After this you see the interface, choose the source directory of wxArt2D, and choose a new build directory. For example for the first packages wxdocview:

 Where is the source directory: C:/tools/CodeB/wxArt2D/packages/wxdocview
 Where to build the binaries: C:/tools/CodeB/buildwxArt2DDebug/packages/wxdocview

Press configure button, Many things turn red, and its start yelling, does not matter.

First make sure you set the options right:

These are the settings for the static, monolithic, debug and non unicode of wxWidgets, which you compiled above. Of course others settings can be generated later in their own build directory.

And now press configure again, this time things will improve. Continue with generate when all is well.

All is set, and we are ready to compile the wxdocview package of wxArt2D.

cd C:/tools/CodeB/buildwxArt2DDebug/packages/wxdocview
mingw-make

This uses the Makefile, which you find in cd C:/tools/CodeB/buildwxArt2DDebug/packages/wxdocview. For release/unicode, you just choose another build directory in the cmake-gui, and the rest is the same. We always recommend outside source builds!

Now after compiling the wxdocview package you must first compile the wxart2d package.

For example for the wxart2d package:

 Where is the source directory: C:/tools/CodeB/wxArt2D/packages/wxart2d
 Where to build the binaries: C:/tools/CodeB/buildwxArt2DDebug/packages/wxart2d

All is set, and we are ready to compile the wxart2d package of wxArt2D.

cd C:/tools/CodeB/buildwxArt2DDebug/packages/wxart2d
mingw-make

Now all should be ready. To use Cmake for your own project study this topic MyOwnApp, which talks about the myapp target generated on the fly after configuring the wxart2d package.

How it looks like in CodeBlocks

wxArt2D: CodeBlocks (last edited 2011-07-14 08:50:49 by KlaasHolwerda)