First Wxwidgets Program

Source: Internet
Author: User
Tags wxwidgets

Wxwidgets installation Method Online has a large heap, you can refer to http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef here to unzip and compile, you can also refer to here:/http blog.csdn.net/sxhelijian/article/details/26163791 (This is also referred to other people to write, there are some places in the wrong, but its decompression and compiling wxwidgets steps are right), In the first address there is a detailed explanation of the compilation command, it is recommended to look at it. It is recommended to compile with this command:

Mingw32-make-f makefile.gcc build=release shared=1 monolithic=1 unicode=1 cxxflags=-fno-keep-inline-dllexport

Pre-compilation reference: http://blog.csdn.net/sxhelijian/article/details/26163791

Well, now you've compiled the wxwidgets by default. My catalogue is D:\wxWidgets-3.0.2 under the official start:

Open Code::Blocks, select New Project, select the bottom wxwidgets project

Then go, when you get here:

Select the version of Wxwidgets you installed, mine is version 3.0.2

The next item is to set the project name and storage address, whatever you like. Next is to set up project details, you need to fill in the relevant information of the author, that is, you can fill out

Next setting:

And then there's this:

Here is to set the address of the wxwidgets you installed, my is in the wxWidgets-3.0.2 folder under the D disk, the folder has Lib and include two folders, of course, there are other files section, said this is only convenient for you to determine what the directory is. OK, continuing next will prompt for missing global variables:

Then build a global variable called WX, as shown in the operation:

Note that you want to match your wxwidgets path, fill it out, and then click Close (This setting applies to future wxwidgets projects), and then continue next

Here is the Setup compiler, of course, choose Code::Blocks's own gcc, the following two options at least one, indicating what you want the final compiled program is what form, choose the first one on the line

Continue Next:

It is very important here, the configuration is wrong, there will be a lot of errors in the configuration as shown in the figure. WxWidgets Library Settings The first must be selected, or your program will be compiled, but the operation will be error, said to be missing wxmsw30ud_gcc_ Custom.dll Dynamic Link library, the second is related to the configuration when you compile wxwidgets, if there is monolithic=1 in the command, then this must be ticked.

Continue Next:

OK, and then next, that's the thing:

Compile and run, it should be 0 error, run the words will fill out this small box:

Congratulations, success, it's like a Hello World:)

First Wxwidgets Program

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.