]>
Commit | Line | Data |
---|---|---|
f6bcfd97 BP |
1 | <HTML> |
2 | ||
3 | <HEAD> | |
fc2171bd | 4 | <TITLE>Compiling wxWidgets applications in the VC++ IDE</TITLE> |
f6bcfd97 BP |
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"> | |
fc2171bd | 18 | Compiling wxWidgets applications in the VC++ IDE |
f6bcfd97 BP |
19 | </font> |
20 | </td> | |
21 | </tr> | |
22 | </table> | |
23 | ||
24 | <P> | |
25 | ||
26 | <CENTER> | |
fc2171bd | 27 | <a href="#wxwin2">Settings for wxWidgets 2.2</a> / <a href="#wxwin1">Settings for wxWidgets 1.68</a> |
f6bcfd97 BP |
28 | </CENTER> |
29 | ||
30 | <P> | |
31 | ||
fc2171bd | 32 | To compile wxWidgets samples and applications using the VC++ 5.0 or 6.0 IDE (having compiled wxWidgets |
f6bcfd97 BP |
33 | using the makefile or project file provided), the following |
34 | steps 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. | |
fc2171bd | 41 | <li>Apply the settings listed below to the project, replacing c:\wx2 with your wxWidgets |
f6bcfd97 BP |
42 | installation path. |
43 | </ol> | |
44 | ||
45 | <P> | |
46 | ||
fc2171bd | 47 | <H2><a name="wxwin2">Settings for wxWidgets 2.2</a></H2> |
f6bcfd97 | 48 | |
fc2171bd JS |
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> | |
f6bcfd97 BP |
51 | |
52 | <DL> | |
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> | |
56 | ||
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> | |
60 | ||
61 | <DT><B>C/C++: Preprocessor</B><DD> | |
62 | The <B>Preprocessor definitions</B> field should contain the following symbols for Debug:<P> | |
63 | ||
64 | <PRE> | |
65 | WIN32,_DEBUG,_WINDOWS,__WINDOWS__,__WXMSW__,__WXDEBUG__,WXDEBUG=1, | |
a71d815b | 66 | __WIN32__,WINVER=0x0400,STRICT |
f6bcfd97 BP |
67 | </PRE> |
68 | <P> | |
69 | and these for Release:<P> | |
70 | ||
71 | <PRE> | |
a71d815b | 72 | NDEBUG,WIN32,_WINDOWS,__WINDOWS__,__WXMSW__,__WIN32__, |
f6bcfd97 BP |
73 | WINVER=0x0400,STRICT</PRE> |
74 | <P> | |
75 | The <B>Additional include directories</B> field should contain the following:<P> | |
76 | <PRE> | |
cf8e0957 | 77 | c:\wx2\include |
f6bcfd97 | 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 | ||
83 | The <B>Not using precompiled headers</B> or <B>Automatic use of precompiled headers</B> | |
84 | button should be selected.<P> | |
85 | ||
86 | <DT><B>C/C++: Code Generation</B><DD> | |
87 | ||
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> | |
90 | ||
91 | <DT><B>Link: Input</B><DD> | |
92 | ||
93 | The <B>Object/library modules</B> field should contain: | |
94 | ||
95 | <PRE> | |
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 | |
fc2171bd | 98 | winmm.lib wxmsw25d.lib wxbase25d.lib wxpngd.lib wxzlibd.lib wxjpegd.lib wxtiffd.lib |
f6bcfd97 BP |
99 | </PRE> |
100 | ||
101 | for the Debug configuration and | |
102 | ||
103 | <PRE> | |
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 | |
fc2171bd | 106 | winmm.lib wxmsw25.lib wxbase25.lib wxpng.lib wxzlib.lib wxjpeg.lib wxtiff.lib |
f6bcfd97 BP |
107 | </PRE> |
108 | ||
109 | for the Release configuration.<P> | |
110 | ||
111 | The <B>Ignore libraries</B> field should contain: | |
112 | ||
113 | <PRE> | |
114 | libcd.lib,libcid.lib,msvcrt.lib | |
115 | </PRE> | |
116 | ||
117 | for the Debug configuration and | |
118 | ||
119 | <PRE> | |
120 | libc.lib,libci.lib,msvcrtd.lib | |
121 | </PRE> | |
122 | ||
123 | for the Release configuration.<P> | |
124 | ||
125 | The <B>Additional library path</B> field should contain | |
126 | ||
127 | <PRE> | |
cf8e0957 | 128 | c:\wx2\lib |
f6bcfd97 BP |
129 | </PRE> |
130 | ||
131 | for both Debug and Release configurations. | |
132 | ||
133 | <P> | |
134 | ||
135 | <DT><B>Resources</B><DD> | |
136 | ||
137 | Select your .rc file. The <B>Additional resource include directories</B> field should contain: | |
138 | ||
139 | <PRE> | |
cf8e0957 | 140 | c:\wx2\include |
f6bcfd97 BP |
141 | </PRE> |
142 | ||
143 | </DL> | |
144 | ||
145 | <HR> | |
146 | ||
fc2171bd | 147 | <H2><a name="wxwin1">Settings for wxWidgets 1.68</a></H2> |
f6bcfd97 BP |
148 | |
149 | Note: these have not yet been checked.<P> | |
150 | ||
151 | <DL> | |
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> | |
155 | ||
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> | |
159 | ||
160 | <DT><B>C/C++: Preprocessor</B><DD> | |
161 | The <B>Preprocessor definitions</B> field should contain the following symbols:<P> | |
162 | <PRE> | |
a71d815b | 163 | WIN32,_DEBUG,_WINDOWS,wx_msw,DEBUG=1,WINVER=0x0400,STRICT |
f6bcfd97 BP |
164 | </PRE> |
165 | <P> | |
166 | The <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 | ||
174 | The <B>Not using precompiled headers</B> or <B>Automatic use of precompiled headers</B> | |
fc2171bd | 175 | button should be selected (I can't find a way of using the wxWidgets PCH file).<P> |
f6bcfd97 BP |
176 | |
177 | <DT><B>C/C++: Code Generation</B><DD> | |
178 | ||
179 | The <B>Use run-time library</B> control should be set to <B>Multithreaded DLL</B>. This | |
fc2171bd | 180 | sets the compiler switch to /MD to match the wxWidgets makefile.<P> |
f6bcfd97 BP |
181 | |
182 | <DT><B>Link: Input</B><DD> | |
183 | ||
184 | The <B>Object/library modules</B> field should contain: | |
185 | ||
186 | <PRE> | |
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 | |
190 | </PRE> | |
191 | ||
192 | The <B>Ignore libraries</B> field should contain: | |
193 | ||
194 | <PRE> | |
195 | libcd.lib,libcid.lib | |
196 | </PRE> | |
197 | ||
198 | <P> | |
199 | ||
200 | <DT><B>Resources</B><DD> | |
201 | ||
202 | Select your .rc file. The <B>Additional resource include directories</B> field should contain: | |
203 | ||
204 | <PRE> | |
cf8e0957 | 205 | ..\..\include\msw |
f6bcfd97 BP |
206 | </PRE> |
207 | ||
208 | </DL> | |
209 | ||
f6bcfd97 BP |
210 | </BODY> |
211 | ||
212 | </HTML> |