Differences between revisions 9 and 10
Revision 9 as of 2011-07-12 13:23:16
Size: 4074
Comment:
Revision 10 as of 2011-07-14 08:42:34
Size: 4183
Comment:
Deletions are marked like this. Additions are marked like this.
Line 96: Line 96:

= How it looks like in CodeBlocks =

 * [[attachment:Directory View]]
 * [[attachment:Virtual View]]

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):

  • Install the wxMSW source distribution.
  • set WXWIN=c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10
  • cd c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10\build\msw
  • mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=0 BUILD=release
  • mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=0 BUILD=debug

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

  • mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=1 BUILD=release
  • mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=1 BUILD=debug

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):

  • c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10\contrib\build\stc

In the you will have compiled wxWidget libraries in:

  • c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10\lib\gcc_lib

And for shared:

  • c:\pathToMywxWidgetsForMingw\wxWidgets2.8.10\lib\gcc_dll

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:

  • wxWidgets_USE_DEBUG 1
  • wxWidgets_USE_MONOLITHIC 1
  • wxWidgets_USE_UNICODE 0
  • wxWidgets_USE_STATIC 1

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)