Environment
Windows7 x64,codeblocks16.01,wxwidgets3.0.2
Steps
First, download the required documents:
1, codeblocks official website: http://www.codeblocks.org I downloaded the version is Codeblocks 16.01;
2, wxwidgets official website: http://www.wxwidgets.org/, go to page https://github.com/wxWidgets/wxWidgets/releases/tag/v3.0.2 download the compiled library and header files.
Note: The compiled library covers more lib, and if you compile release and debug two version compiled for one hours, and the compiled Lib is not complete.
A total of three files:
wxmsw-3.0.2_gcc481tdm_releasedll.7z
wxmsw-3.0.2_gcc481tdm_dev.7z
wxwidgets-3.0.2_headers.7z
Note: The version of the selection, here Select the 32-bit.
Second, decompression and installation
1, installation codeblocks, after installation of the directory: D:\Program Files (x86) \codeblocks-16.01
2, new wxwidgets directory, the above three files extracted to this directory.
Note: wxmsw-3.0.2_gcc481tdm_releasedll.7z and wxmsw-3.0.2_gcc481tdm_dev.7z Decompression Merge directory, change folder name Gcc481tdm_dll to Gcc_dll;
The final catalogs are: D:\wxWidgets\include and D:\wxWidgets\lib\gcc_dll.
Do not include Chinese and white space in the catalogue.
Three, codeblocks configuration
1, open codeblocks;
2, Settings->global Variable
3, Settings->compiler->linker Settings
Add all Lib files (. A files) under the D:\wxWidgets\lib\gcc_dll directory
Iv. New Project
1. File->new->project ...
Select Wxwidgets Project->go
2.
3.
Note Select the corresponding version.
4.
Name and path of the project
5.
You can also not fill in, direct next
6.
7.
Select the solution to the wxwidgets directory
8.
9.
The "Use WxWidgets DLL" and "Enable Unicode" should be checked in the Configuration Options page,
Do not tick "wxWidgets is built as a monolithic library",
The reason is to find the Lib folder is not the same, the former query Gcc_dll, the latter query Gcc_lib, will cause Lib can not find.
10.
According to the need to select the appropriate class library add to the project, you can temporarily what is not selected, later manually added can also.
Finish
11.
Get the project, press F9 compile run, error, such as:
The specific error text information is as follows:
|| = = = Build:debuginchWxWidgetsTestPro1 (compiler:gnu GCC compiler) ===|D:\Program Files (x86) \codeblocks-16.01\mingw\lib\gcc\mingw32\4.9.2\include\c++\bits\c++0x_warning.h| +|error:#errorThis file requires compiler and library support for the ISO C + + standard. This currently experimental, and must are enabled with the-std=c++11 or-std=gnu++11 compiler options.|D:\wxWidgets\include\wx\strvararg.h| -|error:'Is_enum' inch namespace 'STD'does not name a template type|D:\wxWidgets\include\wx\strvararg.h|354|error:'Is_enum'was not declaredinch Thisscope|D:\wxWidgets\include\wx\strvararg.h|354|error:template argument1 isinvalid| | | = = = Build failed:4Error (s),0Warning (s) (0Minute (s),1Second (s)) ===|
Workaround:
Item, right-->build options->compiler Settings->compiler The Flags list, select Select C++0x Support, as
Compile and run again, success.
codeblocks16.01+wxwidgets3.0.2