Codeblocks + wxWidgets Construction

Source: Internet
Author: User
Tags wxwidgets

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.