Professional Documents
Culture Documents
2/6/15, 07:36
Contents
1 Code::Blocks Wiki
2 Code::Blocks Setup Guide in Windows
2.1 Preparing Code::Blocks
3 Building wxWidgets from the command line
3.1 Downloading the last stable wxWidgets library
3.2 Building your own wxWidgets library
3.3 Copying libraries
Code::Blocks Wiki
Code::Blocks' wiki has a good guide on setting up wxWidgets on Code::Blocks:
http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef
Preparing Code::Blocks
Download Code::Blocks with the MINGW bundle from http://www.codeblocks.org
Install Code::Blocks
Page 1 of 3
2/6/15, 07:36
Now we are on the right place we are first going to clean up the source:
mingw32-make.exe -f makefile.gcc clean
NOTE: if you still have problems with compiling after cleaning, you may want to remove the directory in the
build\msw directory. (it contains object files...) When everything is clean we can compile wxWidgets:
First we have to configure the build. If your makefile.gcc (in my version on line 7) includes config.gcc, your
command line parameters will be overriden by the config-file. Thus edit the compiler settings in config.gcc to
reflect your choice. The following are recommended: USE_XRC=1 SHARED=1 MONOLITHIC=1
BUILD=release UNICODE=0
Otherwise, you can build wxWidgets from the commandline as follows:
mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
Now you can get a cup of coffee, or do something else, because this could take a long time.
NOTE: If you mess up and want to clean, you have to pass the same parameters to make clean.
Example for clean commandline:
mingw32-make.exe -f makefile.gcc clean USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
Copying libraries
When compilation is finished it is useful to copy the libs to another directory. By doing this you can make
several builds (e.g. debug and release).
So first we create a directory this could be done in %WXWIN%\lib.
Then we go to the directory %WXWIN%\lib\gcc_dll (could called diffrent when you changed the build
options)
Rename the directory %WXWIN%\lib\gcc_dll to the directory of your choice. (For me it
is %WXWIN%\lib\gcc_dllNonUnicode)
NOTE: Make sure everything is removed from the directory %WXWIN%\lib\gcc_dll else you can get trouble
when compiling another version.
https://wiki.wxwidgets.org/CodeBlocks_Setup_Guide
Page 2 of 3
2/6/15, 07:36
Congratulations! You just finished with the setup of wxWidgets library and you can start developing in
wxWidgets. If any problem occurs, just ask at the Code::Blocks forum (http://forums.codeblocks.org/).
Retrieved from "https://wiki.wxwidgets.org/index.php?title=CodeBlocks_Setup_Guide&oldid=10177"
https://wiki.wxwidgets.org/CodeBlocks_Setup_Guide
Page 3 of 3