Codeblocks + wxWidgets development environment in Windows

Source: Internet
Author: User
Tags wxwidgets

Note: The operation must be performed strictly in the order described in this article.

1. Download and install codeblocks

The installation package used by the pen is codeblocks-10.05mingw-setup.exe, which comes with the mingw tool chain for ease.

Note that the installation path must not contain Chinese characters or spaces. The installation path is: e: \ codeblocks.

After installation, add the bin directory path of mingw to the environment variable path.

For the author's environment, the bin directory of mingw is: e: \ codeblocks \ mingw \ bin

 

2. Configure codeblocks

The timing for this step is important. After codeblocks is installed, you must immediately perform the configuration operation. Otherwise, Character Set compatibility problems may occur.

A) modify the source file storage encoding, open the setting-> Editor-> other setting page, and set the encoding to Windows-936 by default.
B) modify the encoding format used by the compiler to explain the source file and generate the execution file. Open setting-> compiler and debugger settings, and select "Gun GCC compiler" compiler, then compiler settings-> other options, and enter:

-Finput-charset = GBK-fexec-charset = GBK

 

3. Download and install wxWidgets

The version I used is wxWidgets-2.8.12.

Note that the installation path must not contain Chinese characters or spaces. The author's installation path is: e: \ wxWidgets-2.8.12

 

4. Compile wxWidgets (the configuration in step 2 will affect the compilation here)

DOS window, enter E: \ wxWidgets-2.8.12 \ build \ MSW, execute the following command

 

Mingw32-make-F makefile. GCC build = release shared = 1 monolithic = 1 Unicode = 1 2> err. Log

Mingw32-make-F makefile. GCC build = release shared = 0 monolithic = 1 Unicode = 1 2> err. Log

 

5. Configure wxWidgets content in codeblocks

 

Open setting-> compiler and debugger settings-> search directories,

Enter "E: \ wxWidgets-2.8.12 \ include" and "E: \ wxWidgets-2.8.12 \ contrib \ include" in compiler ".

Enter E: \ wxWidgets-2.8.12 \ Lib \ gcc_lib and E: \ wxWidgets-2.8.12 \ Lib \ gcc_dll in linker

Enter E: \ wxWidgets-2.8.12 \ include in resource compiler

 

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.