Saturday, 25 October 2014

Building wxWidgets for Windows

I'm a big fan of wxWidgets ( 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 from :
Extract to : C:\wxWidgets-3.0.2

Download Bakefile v0.2.9 from :

In : C:\wxWidgets-3.0.2\build\msw\
nmake -f BUILD=release clean
nmake -f 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 :

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

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 RUNTIME_LIBS=static BUILD=debug