Differences between revisions 3 and 4
Revision 3 as of 2009-06-17 07:39:56
Size: 2670
Comment:
Revision 4 as of 2009-06-17 07:43:33
Size: 2674
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
So for Unix like builds use MSYS shell, and DOS build use DOS box. See MinGW. So for Unix like builds use MSYS shell, and DOS build use DOS box. See [[MinGW]].

Compiling wxArt2D with MSYS and MinGW

You first need to install MinGW and next on top of that MSYS. You need to work from the MSYS shell, not a DOS box. All paths are meant to be the Unix way, check them within the MSYS shell. Be aware that MinGW has both ways of building available, do not mix up those two. So for Unix like builds use MSYS shell, and DOS build use DOS box. See MinGW.

Next install/unpack wxWidgets and wxArt2D somewhere.

e.g following paths:

c:/MinGW
c:/MinGW/wxWidgets2.8.10
c:/MinGW/buildwxdeb
c:/MinGW/wxArt2D
c:/MinGW/buildwxart2ddeb
c:/tools/cmake

So after starting MSYS you will need/have a PATH something like:

echo $PATH
.:/usr/local/bin:/mingw/bin:/bin:/c/tools/cmake/bin

All of the next is done from the MSYS Unix command shell.

With this you and the windows version of Cmake in your path, we can start compiling. We will be using cmake-gui, to generate the makefiles for wxArt2d later on. But first we build and install wxWidgets, using an outside build directory.

cd /c/MinGW/buildwxdeb
../wxWidgest2.8.10/configure --with-msw --enable-debug --enable-debug_gdb --disable-shared --with-opengl 
make
cd /c/MinGW/buildwxdeb/contrib/src/stc
make
make install

This will give your the libaries of wxWidgets installed, and you can test it by calling wx-config on the MSYS command line. Now we start generating wxArt2D makefiles. We need to set WXWIN in order to find certain files like expat.h from wxWidgest, which are not installed by wxWidgets.

export WXWIN=/c/MinGW/wxWidgets2.8.10
export WXART2D=/c/MinGW/wxArt2D
cd /c/MinGW/buildwxart2ddeb
cmake-gui

After starting cmake-gui, you will be asked for the type of generator. Choose "MSYS Makefiles". After this you see the interface, choose the source directory of wxArt2D, and choose a new build directory. ( USE DOS paths here, that also what you see in cmake-gui, no problem !!) For example:

 Where is the source directory: C:/MinGW/wxArt2D
 Where to build the binaries: c:/MinGW/buildwxart2ddeb

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 0
  • wxWidgets_USE_UNICODE 0
  • wxWidgets_USE_STATIC 1

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

And now press configure again, this times things will improve. Continue with generate when all is well. After this just type:

 make

wxArt2D: MinGWMSys (last edited 2012-12-27 13:13:07 by KlaasHolwerda)