Configure the codeblock + wxWidgets-3.0.1 Development Environment
Author: Sai
1. Download codeblock and go to the official website. First, remind us that the download tool must go to the official website. The latest version has no Trojans.
Http://www.codeblocks.org/downloads/binaries
Download it from sourceforge.net.
Codeblocks-13.12mingw-setup-TDM-GCC-481.exe
2. download the latest wxWidgets 3.0.1 stable version.
Http://www.wxwidgets.org/downloads/
After clicking wxmsw DLLs, the download page is displayed:
Since the built-in mingw of the downloaded codeblock is 32-bit, I chose this.
If it is a 64-bit system and you have downloaded a 64-bit mingw, you can use it. If you are not familiar with it, use a 32-bit mingw.
3. Because the two packages downloaded do not have header files, you need to enter the parent directory to separate the header files.
Http://sourceforge.net/projects/wxwindows/files/3.0.1/
Download wxwidgets-3.0.20.headers.7z:
4. A total of four files need to be downloaded till now:
Codeblock Installation File
WxWidgets compilation requires library files.
5. Install codeblock.
Installed in c: \ Program Files \ codeblocks by default.
6. Run codeblock. If "no" is selected for the pop-up item, the record is missing.
7. Check the compiler. The following-> arrows are all menu-first and Interface Options.
Setting-> environment-> enviroment variables
Check that the values are:
% PATH %; C: \ Program Files \ codeblocks \ mingw \ bin
8. Test and compile and run the c file
File-> New-> empty file, saved as untitle1.c.
Input Source Code:
# Include <stdlib. h>
# Include <stdio. h>
Void main ()
{
Printf ("Hello CB \ n ");
}
Click build> build.
After compilation
Click build-> Run.
9. Create wxWidgets-3.0.1 project.
9.1 file-> New-> Project
9.2 select wxWidgets project.
9.3 select
NOTE: If there is no texture, click Next.
9.4 set the project location and name. I set the name to test_wx.
9.5 select the window type and whether the designer is required. If you are a newbie, we recommend that you do not use the designer. You should first tap the wxframe code.
9.6 Note: This step is important. You need to stop and decompress the Wx library file.
-- Create a directory wxWidgets-3.0.1 somewhere. Do not show Chinese paths here, because mingw does not support.
-- Decompress wxmsw-3.0.20.gcc481tdm_dev.7z to this directory.
-- Decompress wxwidgets-3.0.20.headers.7z to this directory.
Decompressed directory structure
Here the directory wxWidgets-3.0.1 I created is located at c: \ Users \ Apple \ Desktop \ codeblock \ wxWidgets-3.0.1, so the following is its path.
9.7 The default options for debug and release are as follows.
9.8 use dll library and Unicode encoding.
9.9 if the debug and release configurations cannot be found in the pop-up window, do not worry. Select "yes" to continue
9.10 if you do not select anything, you need to select the Wx additional library.
9.11 select finish
9.12. The project has automatically generated two necessary files, that is, inherit the wxframe and wxapp classes.
Test_wxapp.cpp
Test_wxmain.cpp
9.13 right-click Project test_wx and select build. The following error is displayed. This is why the setup. h file cannot be found.
Therefore, we need to modify the header file search path of the library.
Right-click Project test_wx, select build options, and change gcc_dll to gcc481tdm_dll in search directories, as shown in.
And linker.
The page is displayed when you build + run again.
It's over. If you don't know what it is, you have to ask about your character !!!
[WxWidgets] _ [primary] _ [configure codeblock + wxwidgets3.0.1 Development Environment]