Compile wxWidgets with MinGW

Compile wxWidgets with MinGW
Target Development Environment:
  • Windows XP / Vista / 7 / 8.1 / 10
  • Code::Blocks v13.12 - v16.01 with MingGW
  • wxWidgets v3.0.3
[0000] wxWidgets Compile (Unicode, static:no DLL)
  1. Download and release wxWidgets-3.0.3.zip (29.6 MB) and wxWidgets-3.0.2-docs-chm.zip (30.4 MB)
  2. Download and install codeblocks-13.12mingw-setup.exe (97.8 MB) or codeblocks-16.01mingw-setup.exe (79.9 MB)
    mgw0001_001
  3. Set environment variable paths for wxWidgets and MingGW ( MINGW_BIN, WX_MGW) :
    mgw0001_002
  4. Then, log off or reboot as necessary for the changes to take effect.
  5. Open Console DOS box then check if the MingGW make executable file works fine ( Its version is identified as 3.82. ):
    mgw0001_003
    Its version is identified as 3.82.90:
    mgw0001_003_1
  6. Compile wxWidgets Library with MingGW GNU GCC Compiler : (Unicode, static : no DLL)
    • Release Library Build : mingw32-make -f makefile.gcc BUILD=release SHARED=0 UNICODE=1 DEBUG_INFO=0 DEBUG_FLAG=0 DEBUG_RUNTIME_LIBS=0 RUNTIME_LIBS=static
      mgw0001_004
    • Debug Library Build : mingw32-make -f makefile.gcc BUILD=debug SHARED=0 UNICODE=1 DEBUG_INFO=1 DEBUG_FLAG=1 DEBUG_RUNTIME_LIBS=1 RUNTIME_LIBS=static
      mgw0001_005
    • It would take quite a while to finish the builds.
  7. Now check if both are built correctly : Change the current directory to wxWidgets 'samples\minimal' folder : cd ..\..\samples\minimal
  • Command exactly the same statement as wxWidgets release build to build release version of minimal.exe, this time :
    mgw0001_006_release
  • And do the same for debug version build.
  • Now try running both builds of the "minimal.exe" to check if they run fine or not. If they do it means the wxWidgets build has been performed successfully :
    mgw0001_009
    mgw0001_008
Done wxWidgets Library Build!

wxWidgets Compile Summary

Static Unicode Compile (no DLL)
  • MingGW :
    • Release : mingw32-make -f makefile.gcc BUILD=release SHARED=0 UNICODE=1 DEBUG_INFO=0 DEBUG_FLAG=0 DEBUG_RUNTIME_LIBS=0 RUNTIME_LIBS=static
    • Debug : mingw32-make -f makefile.gcc BUILD=debug SHARED=0 UNICODE=1 DEBUG_INFO=1 DEBUG_FLAG=1 DEBUG_RUNTIME_LIBS=1 RUNTIME_LIBS=static

  • Visual C++ : Run vcvarsall.bat beforehand.
    • Release : nmake /f makefile.vc BUILD=release SHARED=0 UNICODE=1 DEBUG_INFO=0 DEBUG_FLAG=0 DEBUG_RUNTIME_LIBS=0 RUNTIME_LIBS=static
    • Debug : nmake /f makefile.vc BUILD=debug SHARED=0 UNICODE=1 DEBUG_INFO=1 DEBUG_FLAG=1 DEBUG_RUNTIME_LIBS=1 RUNTIME_LIBS=static

No comments:

Post a Comment