Code Snippets

  

Other Languages Source Code


Welcome to Dream.In.Code
Become an Expert!

Join 137,221 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,145 people online right now. Registration is fast and FREE... Join Now!





Compile the wxWidgets source on Windows

It can be a little tedious to compile the wxWidgets source code, so this is a simple batch script to do it for you.

Submitted By: gabehabe
Actions:
Rating:
Views: 352

Language: Other Languages

Last Modified: October 9, 2008
Instructions: Simply save as a .bat file (batch script) and execute it. It will ask you to input the path of the MinGW compiler, and the installation directory of wxWidgets.

This script is developed according to the instructions to compile wxWidgets 2.8.9 for CodeBlocks, found here: http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)

Snippet


  1. @ECHO OFF
  2.  
  3. REM Prompt the user to enter the path to MinGW compiler
  4.  
  5. ECHO Please enter the path to MinGW (NOTE: It should not contain spaces.
  6. ECHO If it does, it is recommended that you put it in the root of your C drive
  7. ECHO (example, C:\MinGW\bin)
  8.  
  9. REM Get the input
  10.  
  11. SET /p PATH=
  12.  
  13. REM Prompt the user to enter the path to wxWidgets
  14.  
  15. ECHO Please enter the installation path of wxWidgets
  16. ECHO (example, C:\wxWidgets-2.8.9)
  17.  
  18. REM Get the input
  19.  
  20. SET /p WX=
  21.  
  22. ECHO Executing... Go get a coffee, this may take a while ;)
  23.  
  24. REM Move into the WX directory
  25.  
  26. cd %WX%\build\msw
  27.  
  28. REM First we need to clean the source
  29.  
  30. @ECHO ON
  31.  
  32. %PATH%\mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release clean
  33.  
  34. REM Now compile it
  35.  
  36. %PATH%\mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release
  37.  
  38. ECHO Aaaaand... we're done. Did you enjoy your coffee? :)
  39. ECHO Press any key to exit
  40. PAUSE>NUL

Copy & Paste


Comments


There are currently no comments for this snippet. Be the first to comment!

Add comment


You must be registered and logged on to </dream.in.code> to leave comments.





Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month