Saturday 25 October 2014

Building wxWidgets for Windows

I'm a big fan of wxWidgets (http://wxwidgets.org/) and have used it since its earliest days.

With the release of v3.x I have thought I would update many of the programs I have written over the years to be compatible with this version. The update process has been remarkably painless.

Here is how I build wxWidgets and applications to run under it.


Download wxWidgets-3.0.2.zip from : http://sourceforge.net/projects/wxwindows/files/3.0.2/
Extract to : C:\wxWidgets-3.0.2

Download Bakefile v0.2.9 from : https://github.com/vslavik/bakefile/releases

In : C:\wxWidgets-3.0.2\build\msw\
nmake -f makefile.vc BUILD=release clean
nmake -f makefile.vc RUNTIME_LIBS=static BUILD=release

I almost always use "RUNTIME_LIBS=static" because it saves having to include dlls with the application.

Set the WXWIN environment variable :
WXWIN=C:\wxWidgets-3.0.2

Open a command window in : C:\wxWidgets-3.0.2\samples\ - e.g. animate (C:\wxWidgets-3.0.2\samples\animate\)
nmake -f makefile.vc RUNTIME_LIBS=static BUILD=release
cd vc_mswud
anitest

Occasionally I will use the following for debugging but it is not very often because I still haven't found a better solution than printf (or fprintf for logging to a file) :
nmake -f makefile.vc RUNTIME_LIBS=static BUILD=debug

If you have found this solution useful then please do hit the Google (+1) button so that others may be able to find it as well.
Numerix-DSP Libraries : http://www.numerix-dsp.com/eval/

No comments:

Post a Comment