Easier Way To Build wxWidgets On Windows

It’s been a long time I didn’t write any tutorials… so I think I should now write one.

p/s. If you want to compile wxWidgets with some other settings, please edit the .bat file below by yourself.

First, of course download the latest stable wxWidgets from http://www.wxwidgets.org

After that, download the latest minGW compiler and MSys from http://www.mingw.org

If you have Code::Blocks IDE installed, with minGW in it, please STILL download a standalone minGW because the one included in C::B might not work (and to save your time of course).

After you’ve installed both of them, copy the codes below, which I obtained from the internet (I forgot where lol) and modified.

@ECHO OFF

ECHO Please enter the path to MinGW
ECHO (example, C:\MinGW\bin)

SET /p PATH=

ECHO Please enter the installation path of wxWidgets
ECHO (example, C:\wxWidgets-2.8.10)

SET /p WX=

ECHO Executing…

cd %WX%\build\msw

@ECHO ON

%PATH%\mingw32-make -f makefile.gcc UNICODE=1 SHARED=1 MONOLITHIC=1 BUILD=release clean

%PATH%\mingw32-make -f makefile.gcc UNICODE=1 SHARED=1 MONOLITHIC=1 BUILD=release

ECHO Compilation done

ECHO Press any key to exit
PAUSE>NUL

Paste the code into text editor and save it as .bat file, for example, CompileWxWidgets.bat.

After that, double click the .bat file. You should see something like this:

Follow the instruction by inserting both the directories of MinGW and wxWidgets. After that you should see something crazy like this going on:

It should take couple of minutes so be patient. :-)

If you don’t want to compile at all, just like me, you can download wxPack at http://wxpack.sourceforge.net it’s the fully compiled package which can be used instantly.

2 Responses to “Easier Way To Build wxWidgets On Windows”

  1. sapphire st Says:

    mingw O^O
    its been so long since i used it =_=
    ancient history artifact in my brain.

  2. Zhi Eng Says:

    Seriously I hate using command pad to do stuff because it’s so 80s. But those Linux-dominants want to keep stucking themselves on command line. It’s 2010 now it’s all about GUI, that is why linux will always lose Windows and Mac because of this matter.

Leave a Reply