]> git.saurik.com Git - wxWidgets.git/blame - docs/tech/tn0010.htm
added VC++ project files
[wxWidgets.git] / docs / tech / tn0010.htm
CommitLineData
f6bcfd97
BP
1<HTML>
2
3<HEAD>
4<TITLE>Compiling wxWindows applications in the VC++ IDE</TITLE>
5
6</HEAD>
7
8<BODY BGCOLOR="#FFFFFF" TEXT=#000000 LINK=#FF0000 VLINK=#000000>
9
10<font face="Arial, Lucida Sans, Helvetica">
11
12<a name="top"></a>
13
14<table width=100% border=0 cellpadding=5 cellspacing=0>
15<tr>
16<td bgcolor="#C4ECF9">
17<font size=+1 face="Arial, Lucida Sans, Helvetica" color="#000000">
18Compiling wxWindows applications in the VC++ IDE
19</font>
20</td>
21</tr>
22</table>
23
24<P>
25
26<CENTER>
2b5f62a0 27<a href="#wxwin2">Settings for wxWindows 2.2</a> / <a href="#wxwin1">Settings for wxWindows 1.68</a>
f6bcfd97
BP
28</CENTER>
29
30<P>
31
32To compile wxWindows samples and applications using the VC++ 5.0 or 6.0 IDE (having compiled wxWindows
33using the makefile or project file provided), the following
34steps and settings should be used.<P>
35
36<H2>Steps</H2>
37
38<ol>
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 wxWindows
42installation path.
43</ol>
44
45<P>
46
2b5f62a0 47<H2><a name="wxwin2">Settings for wxWindows 2.2</a></H2>
f6bcfd97 48
2b5f62a0
VZ
49These settings apply to wxWindows 2.1.14 and above but most of them are not
50necessary any longer for wxWindows 2.3+.<P>
f6bcfd97
BP
51
52<DL>
53<DT><B>General</B><DD>
54The <B>Output files</B> and <B>Intermediate files</B> directory fields should be Debug
55for the Debug configuration, and Release for the Release configuration.<P>
56
57<DT><B>Debug: General</B><DD>
58The <B>Executable for debug sessions</B> field should be altered to be the path and name
59you'd expect (it may have generated a different name).<P>
60
61<DT><B>C/C++: Preprocessor</B><DD>
62The <B>Preprocessor definitions</B> field should contain the following symbols for Debug:<P>
63
64<PRE>
65WIN32,_DEBUG,_WINDOWS,__WINDOWS__,__WXMSW__,__WXDEBUG__,WXDEBUG=1,
66__WIN95__,__WIN32__,WINVER=0x0400,STRICT
67</PRE>
68<P>
69and these for Release:<P>
70
71<PRE>
72NDEBUG,WIN32,_WINDOWS,__WINDOWS__,__WXMSW__,__WIN95__,__WIN32__,
73WINVER=0x0400,STRICT</PRE>
74<P>
75The <B>Additional include directories</B> field should contain the following:<P>
76<PRE>
77c:\wx2\include,c:\wx2\contrib\include
78</PRE>
2edb0bde 79<P>(and of course any other directories you wish to use in your project).<P>
f6bcfd97
BP
80
81<DT><B>C/C++: Precompiled Headers</B><DD>
82
83The <B>Not using precompiled headers</B> or <B>Automatic use of precompiled headers</B>
84button should be selected.<P>
85
86<DT><B>C/C++: Code Generation</B><DD>
87
88The <B>Use run-time library</B> control should be set to <B>Debug Multithreaded DLL</B> (Debug)
89or <B>Multithreaded DLL</B> (Release).<P>
90
91<DT><B>Link: Input</B><DD>
92
93The <B>Object/library modules</B> field should contain:
94
95<PRE>
96kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
97ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib
98winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib
99</PRE>
100
101for the Debug configuration and
102
103<PRE>
104kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
105ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib
106winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib
107</PRE>
108
109for the Release configuration.<P>
110
111The <B>Ignore libraries</B> field should contain:
112
113<PRE>
114libcd.lib,libcid.lib,msvcrt.lib
115</PRE>
116
117for the Debug configuration and
118
119<PRE>
120libc.lib,libci.lib,msvcrtd.lib
121</PRE>
122
123for the Release configuration.<P>
124
125The <B>Additional library path</B> field should contain
126
127<PRE>
128c:\wx2\lib,c:\wx2\contrib\lib
129</PRE>
130
131for both Debug and Release configurations.
132
133<P>
134
135<DT><B>Resources</B><DD>
136
137Select your .rc file. The <B>Additional resource include directories</B> field should contain:
138
139<PRE>
140c:\wx2\include;c:\wx2\contrib\include
141</PRE>
142
143</DL>
144
145<HR>
146
147<H2><a name="wxwin1">Settings for wxWindows 1.68</a></H2>
148
149Note: these have not yet been checked.<P>
150
151<DL>
152<DT><B>Debug: General</B><DD>
153The <B>Executable for debug sessions</B> field should be altered to be the path and name
154you'd expect (it may have generated a different name).<P>
155
156<DT><B>General</B><DD>
157The <B>Output directories</B> fields can be made blank if you want the objects
158and executable to be created in the project directory and not a subdirectory.<P>
159
160<DT><B>C/C++: Preprocessor</B><DD>
161The <B>Preprocessor definitions</B> field should contain the following symbols:<P>
162<PRE>
163WIN32,_DEBUG,_WINDOWS,wx_msw,DEBUG=1,WIN95=1,WINVER=0x0400,STRICT
164</PRE>
165<P>
166The <B>Additional include directories</B> field should contain the following:<P>
167<PRE>
168../../include/base,../../include/msw
169</PRE>
2edb0bde 170<P>(and of course any other directories you wish to use in your project).<P>
f6bcfd97
BP
171
172<DT><B>C/C++: Precompiled Headers</B><DD>
173
174The <B>Not using precompiled headers</B> or <B>Automatic use of precompiled headers</B>
175button should be selected (I can't find a way of using the wxWindows PCH file).<P>
176
177<DT><B>C/C++: Code Generation</B><DD>
178
179The <B>Use run-time library</B> control should be set to <B>Multithreaded DLL</B>. This
180sets the compiler switch to /MD to match the wxWindows makefile.<P>
181
182<DT><B>Link: Input</B><DD>
183
184The <B>Object/library modules</B> field should contain:
185
186<PRE>
187kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
188shell32.lib odbc32.lib odbccp32.lib comctl32.lib
189../../lib/wx.lib ../../src/msw/dummy.obj
190</PRE>
191
192The <B>Ignore libraries</B> field should contain:
193
194<PRE>
195libcd.lib,libcid.lib
196</PRE>
197
198<P>
199
200<DT><B>Resources</B><DD>
201
202Select your .rc file. The <B>Additional resource include directories</B> field should contain:
203
204<PRE>
205..\..\include\msw;..\..\contrib\fafa
206</PRE>
207
208</DL>
209
f6bcfd97
BP
210</BODY>
211
212</HTML>