Differences between revisions 4 and 11 (spanning 7 versions)
Revision 4 as of 2009-06-16 09:35:10
Size: 2918
Comment:
Revision 11 as of 2011-07-14 08:49:31
Size: 4212
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Compiling wxArt2D with CodeBlocks = = Compiling wxArt2D with CodeBlocks (non Unix fashion) =

First read WxArt2dInstallCmake, the directory structure required is explained in there, not here.
Line 13: Line 15:
In short: In short from within a DOS box (any other wxwidgest will do):
Line 21: Line 23:
If your not in a hurry, right away do all other: If you are not in a hurry, right away do all other:
Line 27: Line 29:
Next with the same lines as above goto, and compile the stc library: Next with the same lines as above goto, and compile the stc library (PS newer version of wxWidgets already have this compiled in):
Line 45: Line 47:
cmake-gui
Line 48: Line 49:
After starting ''cmake-gui'', you will be asked for the type of generator. Choose "MinGW Makefiles" or the "CodeBlocks - MinW Makefiles". The last one in fact produces the same make files, but with added CodeBlock project file. 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.
Line 50: Line 53:
For example: For example for the first packages wxdocview:
Line 52: Line 55:
 Where is the source directory: C:/tools/CodeB/wxArt2D
 Where to build the binaries: C:/tools/CodeB/buildwxArt2DDebug
 Where is the source directory: C:/tools/CodeB/wxArt2D/packages/wxdocview
 Where to build the binaries: C:/tools/CodeB/buildwxArt2DDebug/packages/wxdocview
Line 55: Line 58:
Press configure button, Many things turn red, and its start yelling, does not matter. Press configure button, '''Many things turn red, and its start yelling, does not matter'''.
Line 63: Line 66:
These are the settings for the static, monolithic, debug and non unicode of wxWidgets, which you compiled above. Of course others can 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.
Line 65: Line 68:
And now press configure again, this times things will improve. Continue with generate when all is well. And now press configure again, this time things will improve. Continue with generate when all is well.
Line 67: Line 70:
All is set, and we are ready to compile wxArt2D. All is set, and we are ready to compile the wxdocview package of wxArt2D.
Line 69: Line 72:
cd C:/tools/CodeB/buildwxArt2DDebug cd C:/tools/CodeB/buildwxArt2DDebug/packages/wxdocview
Line 73: Line 76:
This uses the Makefile, which you find in cd C:/tools/CodeB/buildwxArt2DDebug. For release/unicode, you just choose another build directory in the cmake-gui, and the rest is the same.
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.
Line 75: Line 80:

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 =

 * [[attachment:Directory View]]
 * [[attachment:Virtual View]]
 * [[attachment:dirtree.gif]]

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)