Friday, August 14, 2015

Howto Build wxWidgets with MinGW

This tutorial is intended for the beginner who wish to have wxWidgets up and running in Windows environment. The build using MinGW without Msys.

Installing Toolchain

Download TDM-GCC from


After completion of installation, please relogin to Windows to make sure path to tdm-gcc applied.

Prepare wxWidgets Source

> Extract into c:\opt\wxWidgets\wxWidgets-3.0.2
> cd \opt\wxWidgets\wxWidgets-3.0.2\build\msw

Build for DEBUG Version

> mingw32-make -f makefile.gcc BUILD=debug UNICODE=1 SHARED=0 CXXFLAGS="-std=gnu++11"

Build for Release Version

> mingw32-make -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 CXXFLAGS="-std=gnu++11"

Final Result is Here

That’s all, the simple steps to build wxWidgets on Windows without Msys. Check the result inside this folder: lib\gcc_lib


Walbert Schulpen said...

Great Post! Can I build the wxWidgets on one machine, and deploy the build to similar machines running the same software and windows version? Can I just copy the wxwidgets folder across, or do I need to do more? Thanks!

Tom Smith said...

Thanks so much for the post! I've been struggling to get wxwidgets compiled using MinGW, and unfortunately, I'm still having problems.
Could you offer some guidance?
I've installed mingw and the source for wxwidgets-3.0.2 and when I try to compile using the command in the post,I get several 'redefinition' errors, such as:

c:\mingw\include\time.h:172:8: error: redinition of 'struct tm'

Do you have any idea how to work around this?