Sunday, June 14, 2009

Building WxWidgets on Windows with MinGW + MSYS

This is a short tutorial about how to get Debug and Release builds from wxWidgets sources.

Pre-Requisites:
- Windows 2000/XP (the commands should work on Linux too but I didn't test them yet)
- MinGW + MSYS
- latest stable wxWidgets release (at the time of this writing it's 2.8.10) downloadable here


Debug Build
1. Extract the source archive wherever you want
2. Start MSYS and get into the source directory (in my case cd d:/wxWidgets2.8.10)
3. Type ./configure --enable-shared --enable-debug --with-opengl --prefix=D:/wx-Debug

--enable-shared --> build wxWidgets as a shared library (or dynamic library if you prefer)
--enable-debug --> build a debug version of wxWidgets
--with-opengl --> enable OpenGL widgets (it is not mandatory if you don't plan to use OpenGL)
--prefix=D:/wx-Debug --> the directory where we want to install wxWidgets (it's not mandatory but it helps to make things cleaner)

After configure ends its duties, it should send you back a message about the configuration you choose.
4. Now type: make
and then: make install

Now you should have your wxWidgets Debug version installed.

Release Build
1. Get into your wxWidgets source directory again
2. Type ./configure --enable-shared --disable-debug --with-opengl --prefix=D:/wx-Release
3. Type make
and then make install

Next time I'll show you how to setup Eclipse with wxWidgets!
Stay tune and thanks for reading.

0 comments:

Post a Comment