使用wxWidgets开发应用程序时的VC++配置

29 篇文章 0 订阅
10 篇文章 0 订阅

From: http://www.wxwidgets.org/docs/technote/vc_ide.htm

 

To compile wxWidgets samples and applications using the VC++ 5.0 or 6.0 IDE (having compiled wxWidgets using the makefile or project file provided), the following steps and settings should be used.

Steps

  1. Create a new WIN32 Application project.
  2. Add the .cpp and .rc files for your project.
  3. Apply the settings listed below to the project, replacing c:/wx2 with your wxWidgets installation path.

Settings for wxWidgets 2

These settings apply to wxWidgets 2.3.0 and above.

You can set them explicitly as follows, or you can create a project by copying a sample, e.g. minimal. However, if you copy it out of the wxWidgets installation tree then you will have to replace all "../.." and "../.." in the .dsp project file with the path to the installation, or $(WXWIN).

General
The Output files and Intermediate files directory fields should be Debug for the Debug configuration, and Release for the Release configuration.
Debug: General
The Executable for debug sessions field should be altered to be the path and name you'd expect (it may have generated a different name).
C/C++: Preprocessor
The Preprocessor definitions field should contain the following symbols for Debug:
WIN32,_DEBUG,_WINDOWS,__WINDOWS__,__WXMSW__,__WXDEBUG__,WXDEBUG=1,
__WIN95__,__WIN32__,WINVER=0x0400,STRICT

and these for Release:

NDEBUG,WIN32,_WINDOWS,__WINDOWS__,__WXMSW__,__WIN95__,
__WIN32__,WINVER=0x0400,STRICT

The Additional include directories field should contain the following:

c:/wx2/include,c:/wx2/contrib/include,c:/wx2/lib/msw[d]

(and of couse any other directories you wish to use in your project). You could use $(WXWIN) instead of c:/wx2 above.

C/C++: Precompiled Headers
The Not using precompiled headers or Automatic use of precompiled headers button should be selected.
C/C++: Code Generation
The Use run-time library control should be set to Debug Multithreaded DLL (Debug) or Multithreaded DLL (Release).
Link: Input
The Object/library modules field should contain:
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib
pngd.lib zlibd.lib jpegd.lib tiffd.lib

for the static Debug configuration and

kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw.lib png.lib zlib.lib
jpeg.lib tiff.lib

for the static Release configuration.

The Ignore libraries field should contain:

libcd.lib,libcid.lib,msvcrt.lib

for the Debug configuration and

libc.lib,libci.lib,msvcrtd.lib

for the Release configuration.

The Additional library path field should contain:

c:/wx2/lib,c:/wx2/contrib/lib

for both Debug and Release configurations.

Resources
Select your .rc file and the Resources tab. The Additional resource include directories field should contain:
c:/wx2/include;c:/wx2/contrib/include
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值