1. Download and install codeblocks
Http://www.codeblocks.org/
Select complete installation. Because some commands in mingw32 seem to have poor support for directories containing Chinese characters or spaces, do not select folders with spaces.
2. Add the system environment variable path
X: \ codeblocks \ mingw \ bin;
X: \ codeblocks \ mingw \ libexec \ GCC \ mingw32 \ 4.4.1;
Verify that the settings are correct:
Start Menu, run and enter "cmd ". In the console window, enter the following content:
PATH (Press ENTER)
In the screen output, you must be able to find the preceding path information. Then enter a line:
Mingw32-make.exe (Press ENTER)
If the screen output is: "... It is neither an internal command nor runableProgram......", The configuration is incorrect.
3. Check whether the codeblocks configuration is correct.
Settings-> compiler and debugger-> toolchain executables
GNU gcc Compiler
Compiler's installation directory
D: \ cppprogram \ codeblocks \ mingw
C compiler: mingw32-gcc.exe
C ++ Compiler: mingw32-g00000000.exe
Linker for dynamic libs: mingw32-g00000000.exe
Linker for static libs: ar.exe
Debugger: gdb.exe
Resource compiler: windres.exe
Make program: mingw32-make.exe
3. Download and install wxmsw-installer for Windows
Http://www.wxwidgets.org/
Http://sourceforge.net/projects/wxwindows/files/2.8.11/wxMSW-2.8.11-Setup.exe/download
Compiled:
Http://wxpack.sourceforge.net/Main/HomePage
After installation is complete, compile and use the following BAT file. Shared = 1 is a dynamic link
Code
@ Echo off
D:
CD wxWidgets - 2.8 . 11 \ Build \ MSW
Compile wxWidgets with title
Echo starts Compilation
Echo ---------------------------------------------------------------------
Echo compilation release version
Mingw32 - Make - F makefile. GCC build = Release shared = 1 Monolithic = 0 Unicode = 1
Echo compilation release version
Mingw32 - Make - F makefile. GCC build = Release shared = 0 Monolithic = 0 Unicode = 1
Echo compilation and debugging version
Mingw32 - Make - F makefile. GCC build = Debug shared = 1 Monolithic = 0 Unicode = 1
Echo compilation and debugging version
Mingw32 - Make - F makefile. GCC build = Debug shared = 0 Monolithic = 0 Unicode = 1
Echo ---------------------------------------------------------------------
Echo compilation ended
Pause
4. Set global variables in codeblocks
Settings-global variables
Current set: New ikeli
Current variable: Create WX
Built-in Fields
Base: D: \ wxWidgets-2.8.11
Include: D: \ wxWidgets-2.8.11 \ include
Lib: D :\ wxWidgets-2.8.11 \ Lib