WxWidgets compilation Overview

Source: Internet
Author: User
Tags wxwidgets

// * Create by zyzx
// * 2009-3-11
// * Reprinted please indicate the source: http://www.cppblog.com/zyzx

I have been using the wxWidgets library for more than a year. Many times I want to write something of the recall nature for future reference. However, every time I write a pen, I have not raised the pen for interruptions or fragmentation. Although I am not familiar with wxWidgets for a long time, I will not be able to use it in my future work, and it will take a lot of effort to write things, however, I try my best to express what I know and leave it to the people who need it to reduce the entry time.

1. wx database Introduction
Cross-platform GUI library. Google it to see if it is what you need.

Http://www.wxwidgets.org/
Wiki: http://wiki.wxwidgets.org/Main_Page

Ii. Vs + Win32 environment Compilation

Target database version: 2.8.7

Compilation platform: WINXP + vs2005

Compilation type: dynamic library + Unicode + debug

Compilation Target Platform: Win32

1. Open the project wxWidgets- 2.8.7 \ Build \ MSW \ wx_dll.dsw, convert it to vs2005 project, close and save it, and then open the project wx_dll.sln.

2. Change the solution configuration to DLL Unicode debug.

3. Separately compile wxregex, wxzlib, wxexpat, wxtiff, base, wxjpeg, wxpng, core, ODBC, XML, ADV, HTML, net, GL, DBGrid, QA, richtext, AuI, XRC, and media library.

Currently, the ODBC, GL, and DBGrid projects are not complete. You can ignore the compilation errors.

4. If the above steps are successful, we will get the following library files we need

Compile the predefined Environment

WxWidgets- 2.8.7 \ Lib \ vc_dll \ mswud \ wx \ setup. h
WxWidgets- 2.8.7 \ Lib \ vc_dll \ mswud \ wx \ MSW \ rcdefs. h

WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxbase28ud_net_vc_custom.dll
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxbase28ud_odbc_vc_custom.dll
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxbase28ud_vc_vc_custom.dll
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxbase28ud_xml_vc_custom.dll
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_adv_vc_custom.dll
W xwidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_aui_vc_custom.dll
W xwidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_core_vc_custom.dll
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_gl_vc_custom.dll
W xwidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_html_vc_custom.dll
W xwidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_media_vc_custom.dll
W xwidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_qa_vc_custom.dll
W xwidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_richtext_vc_custom.dll
W xwidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_xrc_vc_custom.dll

WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxbase28ud. Lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxbase28ud_net.lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxbase28ud_xml.lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxexpatd. Lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmongod. Lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_adv.lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_aui.lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_core.lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_html.lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_media.lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_qa.lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_richtext.lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmsw28ud_xrc.lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxpngd. Lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxregexud. Lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxmongod. Lib
WxWidgets- 2.8.7 \ Lib \ vc_dll \ wxzlibd. Lib

Note: copy the above files to the path of the library to be created based on the relative structure of the original directory, and copy wxWidgets- 2.8.7 The \ include directory is also copied to its directory. Later, you only need to include these paths.


For future development convenience, the path of the Development Library is set:
Wxlib \ include
Wxlib \ debug \ mswud \ wx \ MSW
Wxlib \ debug

Iii. Vs + wince environment Compilation

Target database version: 2.8.7

Compilation platform: WINXP + vs2005

Compilation type: static library + Unicode + debug + Pocket PC 2003 (arm4)

Compilation Target Platform: wince4.0 or above

1. Open the project wxWidgets- 2.8.7 \ Build \ wince \ wx. vcw. This project is an EVC project. First, it is converted to the Wx. sln project of vs2005.

2. Open wxWidgets- 2.8.7 \ Include \ wx \ minifram. h file, before the last endif

// ** Add: The wince end cannot be compiled.

# Ifdef _ win32_wce

# Include "wx/frame. H"

Typedef wxframe wxminiframe;

# Endif

3. Compile wxzlib, wxpng, wxjpeg, wxexpat, GL, and mono in sequence. There will be some minor issues with the direct compilation. Please refer to the replies on the first and second floors.

If any compilation event error occurs, recompile it once.

4. If you compile the above code, you can obtain the library files we need as follows:

WxWidgets- 2.8.7 \ Lib \ evc_armv4_lib \ winced \ wx \ setup. h
WxWidgets- 2.8.7 \ Lib \ evc_armv4_lib \ winced \ wx \ MSW \ rcdefs. h
WxWidgets- 2.8.7 \ Build \ wince \ Pocket PC 2003 (armv4) \ debug \ wx_wxzlib.lib
WxWidgets- 2.8.7 \ Build \ wince \ Pocket PC 2003 (armv4) \ debug \ wx_wxpng.lib
WxWidgets- 2.8.7 \ Build \ wince \ Pocket PC 2003 (armv4) \ debug \ wx_wx0000.lib
WxWidgets- 2.8.7 \ Build \ wince \ Pocket PC 2003 (armv4) \ debug \ wx_wxexpat.lib
WxWidgets- 2.8.7 \ Build \ wince \ Pocket PC 2003 (armv4) \ debug \ wx_gl.lib
WxWidgets- 2.8.7 \ Build \ wince \ Pocket PC 2003 (armv4) \ debug \ wx_mono.lib

Note: copy the above files to the path of the library to be created according to the relative structure of the original directory, and

WxWidgets- 2.8.7 The \ include directory is also copied to its directory. Later, you only need to include these paths.

For future development convenience, the path of the Development Library is set:
Wxcelib \ include
Wxcelib \ debug \ winced \ wx \ MSW
Wxcelib \ debug

The above is the vs compiling environment, and I have also tried to compile it in the eclipse + GCC + Win32 environment. Since only the Win32 and wince environments are exposed to work and life, the Wx library can only describe these two environments.

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.