4 <TITLE>Compiling wxWidgets applications in the VC++ IDE
</TITLE> 
   8 <BODY BGCOLOR=
"#FFFFFF" TEXT=#
000000 LINK=#FF0000 VLINK=#
000000> 
  10 <font face=
"Arial, Lucida Sans, Helvetica"> 
  14 <table width=
100% border=
0 cellpadding=
5 cellspacing=
0> 
  16 <td bgcolor=
"#C4ECF9"> 
  17 <font size=+
1 face=
"Arial, Lucida Sans, Helvetica" color=
"#000000"> 
  18 Compiling wxWidgets applications in the VC++ IDE
 
  27 <a href=
"#wxwin2">Settings for wxWidgets 
2.2</a> / 
<a href=
"#wxwin1">Settings for wxWidgets 
1.68</a> 
  32 To compile wxWidgets samples and applications using the VC++ 
5.0 or 
6.0 IDE (having compiled wxWidgets
 
  33 using the makefile or project file provided), the following
 
  34 steps and settings should be used.
<P> 
  39 <li>Create a new WIN32 Application project.
 
  40 <li>Add the .cpp and .rc files for your project.
 
  41 <li>Apply the settings listed below to the project, replacing c:\wx2 with your wxWidgets
 
  47 <H2><a name=
"wxwin2">Settings for wxWidgets 
2.2</a></H2> 
  49 These settings apply to wxWidgets 
2.1.14 and above but most of them are not
 
  50 necessary any longer for wxWidgets 
2.3+.
<P> 
  53 <DT><B>General
</B><DD> 
  54 The 
<B>Output files
</B> and 
<B>Intermediate files
</B> directory fields should be Debug
 
  55 for the Debug configuration, and Release for the Release configuration.
<P> 
  57 <DT><B>Debug: General
</B><DD> 
  58 The 
<B>Executable for debug sessions
</B> field should be altered to be the path and name
 
  59 you'd expect (it may have generated a different name).
<P> 
  61 <DT><B>C/C++: Preprocessor
</B><DD> 
  62 The 
<B>Preprocessor definitions
</B> field should contain the following symbols for Debug:
<P> 
  65 WIN32,_DEBUG,_WINDOWS,__WINDOWS__,__WXMSW__,__WXDEBUG__,WXDEBUG=
1,
 
  66 __WIN32__,WINVER=
0x0400,STRICT
 
  69 and these for Release:
<P> 
  72 NDEBUG,WIN32,_WINDOWS,__WINDOWS__,__WXMSW__,__WIN32__,
 
  73 WINVER=
0x0400,STRICT
</PRE> 
  75 The 
<B>Additional include directories
</B> field should contain the following:
<P> 
  79 <P>(and of course any other directories you wish to use in your project).
<P> 
  81 <DT><B>C/C++: Precompiled Headers
</B><DD> 
  83 The 
<B>Not using precompiled headers
</B> or 
<B>Automatic use of precompiled headers
</B> 
  84 button should be selected.
<P> 
  86 <DT><B>C/C++: Code Generation
</B><DD> 
  88 The 
<B>Use run-time library
</B> control should be set to 
<B>Debug Multithreaded DLL
</B> (Debug)
 
  89 or 
<B>Multithreaded DLL
</B> (Release).
<P> 
  91 <DT><B>Link: Input
</B><DD> 
  93 The 
<B>Object/library modules
</B> field should contain:
 
  96 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
 
  97 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib
 
  98 winmm.lib wxmsw25d.lib wxbase25d.lib wxpngd.lib wxzlibd.lib wxjpegd.lib wxtiffd.lib
 
 101 for the Debug configuration and
 
 104 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
 
 105 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib
 
 106 winmm.lib wxmsw25.lib wxbase25.lib wxpng.lib wxzlib.lib wxjpeg.lib wxtiff.lib
 
 109 for the Release configuration.
<P> 
 111 The 
<B>Ignore libraries
</B> field should contain:
 
 114 libcd.lib,libcid.lib,msvcrt.lib
 
 117 for the Debug configuration and
 
 120 libc.lib,libci.lib,msvcrtd.lib
 
 123 for the Release configuration.
<P> 
 125 The 
<B>Additional library path
</B> field should contain
 
 131 for both Debug and Release configurations.
 
 135 <DT><B>Resources
</B><DD> 
 137 Select your .rc file. The 
<B>Additional resource include directories
</B> field should contain:
 
 147 <H2><a name=
"wxwin1">Settings for wxWidgets 
1.68</a></H2> 
 149 Note: these have not yet been checked.
<P> 
 152 <DT><B>Debug: General
</B><DD> 
 153 The 
<B>Executable for debug sessions
</B> field should be altered to be the path and name
 
 154 you'd expect (it may have generated a different name).
<P> 
 156 <DT><B>General
</B><DD> 
 157 The 
<B>Output directories
</B> fields can be made blank if you want the objects
 
 158 and executable to be created in the project directory and not a subdirectory.
<P> 
 160 <DT><B>C/C++: Preprocessor
</B><DD> 
 161 The 
<B>Preprocessor definitions
</B> field should contain the following symbols:
<P> 
 163 WIN32,_DEBUG,_WINDOWS,wx_msw,DEBUG=
1,WINVER=
0x0400,STRICT
 
 166 The 
<B>Additional include directories
</B> field should contain the following:
<P> 
 168 ../../include/base,../../include/msw
 
 170 <P>(and of course any other directories you wish to use in your project).
<P> 
 172 <DT><B>C/C++: Precompiled Headers
</B><DD> 
 174 The 
<B>Not using precompiled headers
</B> or 
<B>Automatic use of precompiled headers
</B> 
 175 button should be selected (I can't find a way of using the wxWidgets PCH file).
<P> 
 177 <DT><B>C/C++: Code Generation
</B><DD> 
 179 The 
<B>Use run-time library
</B> control should be set to 
<B>Multithreaded DLL
</B>. This
 
 180 sets the compiler switch to /MD to match the wxWidgets makefile.
<P> 
 182 <DT><B>Link: Input
</B><DD> 
 184 The 
<B>Object/library modules
</B> field should contain:
 
 187 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
 
 188 shell32.lib odbc32.lib odbccp32.lib comctl32.lib
 
 189 ../../lib/wx.lib ../../src/msw/dummy.obj
 
 192 The 
<B>Ignore libraries
</B> field should contain:
 
 200 <DT><B>Resources
</B><DD> 
 202 Select your .rc file. The 
<B>Additional resource include directories
</B> field should contain: