Configure the wxWidgets project in Visual C ++ 6

Source: Internet
Author: User
Tags wxwidgets

WxWidgets is an open-source cross-platform GUI library. Its programs can run on Windows, Linux, Mac OS, and other platforms, or even Windows CE and Palm OS. latest version 2.6.2. not only the GUI, but also the media, socket, ODBC and other libraries. for more information, see http://www.wxwidgets.org/

Download wxWidgets 2.6.2 for Windows. After installing the file, you can find the Wx in % wxwin %/build/MSW. DSW and wx_dll.dsw. one is compiled into Lib, and the other is compiled into DLL. after debugging, wxbase26d is generated in % wxwin %/lib/vc_lib. lib, wxbase26d_net.lib, wxbase26d_odbc.lib, wxbase26d_xml.lib, wxexpatd. lib, wxmongod. lib, wxmsw26d_adv.lib, wxmsw26d_core.lib, release, release, wxmsw26d_html.lib, wxmsw26d_media.lib, release, wxmsw26d_xrc.lib, wxpngd. lib, wxregexd. lib, wxmongod. lib, wxzlibd. lib. now, we can build our project.

Open vc6 and create a blank project for Win32 application. Here I name it wxstudy.
Use Alt + F7 to enter Project Settings
1. C/C ++ tab-> code generation-> use run-time library is set:Debug mutilthread DLL
2. C/C ++ tab-> Preprocessor definitions:Win32, _ debug, _ WINDOWS, _ MBCS ,__ wxmsw __,__ wxdebug __
That is, if _ wxmsw __,__ wxdebug _ is added, if the version is release, _ wxdebug _ is not added.
3. C/C ++ tab-> Preprocessor-> additional include directions ctions setD:/program files/wxWidgets-2.6.2/include, D:/program files/wxWidgets-2.6.2/lib/vc_lib/mswd ,.This is to set the additional include path, because my wxWidgets is installed under D:/program files, so it is set like this.
After step 2 is completed, the project options of the C/C ++ tab is:
/Nologo/MDD/W3/GM/GX/Zi/OD/I "d:/program files/wxWidgets-2.6.2/include"/I "d: /program files/wxWidgets-2.6.2/lib/vc_lib/mswd "/I ". "/D" Win32 "/D" _ debug "/D" _ WINDOWS "/D" _ MBCS "/D" _ wxmsw _ "/D" _ wxdebug _ _ "/FP" Debug/wxtest. PCH "/Yx/FO" Debug/"/FD" Debug/"/FD/GZ/ehs/ C
4. Set link below.
Link tab-> input-> Object/library modules:Wxmsw26d_core.lib wxbase26d. lib wxmongod. lib wxmongod. lib wxpngd. lib wxzlibd. lib wxregexd. lib wxexpatd. lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool. lib winmm. lib shell32.lib comctl32.lib ole32.lib oleaut32.lib UUID. lib rpcrt4.lib advapi32.lib wsock32.lib oleacc. lib odbc32.lib. In general, wxdigets GUI projects are more vulnerable than common Windows programs, including wxbase26d. Lib wxmongod. Lib wxmongod. Lib wxpngd. Lib wxzlibd. Lib wxregexd. Lib wxexpatd. Lib.
5.
Link tab-> input-> addtional library path is set:D:/program files/wxWidgets-2.6.2/lib/vc_lib
This is a common wxwdigets project.
We use the example minimal that comes with wxWidgets to add it to the project. Create a minimal. cpp file, copy the code, and compile it successfully!


 

Related Article

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.