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:/MINGW/msys
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

PS: If you goto c:/MINGW/msys/1.0/local with explorer, you will find what is installed. In the MSYS shell that path is cd /usr/local.

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
cd /c/MinGW/buildwxart2ddeb
./configure

It is advised not to use the configure script at first, and use WxArt2dInstallCmake to do it by hand.

The configure script follows the general approach to configure all packages in the right order, and calls cmake at the right moment.

When cmake-gui is started, 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 ( in this example wxWidgets was compiled for the next options):

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. Press configure again, this time things will improve. Continue with generate when all is well.

If thinks go wrong, try compiling the packages one by one as explained WxArt2dInstall especially follow the steps by hand in WxArt2dInstallCmake.

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