]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/msw/install.txt
more files to ignore in cvs commands (setup.h, lex_yy.c, y_tab.c)
[wxWidgets.git] / docs / msw / install.txt
... / ...
CommitLineData
1
2Installing wxWindows 2.0
3------------------------
4
5Unarchiving
6-----------
7
8If there is a setup program, run the setup program that comes with the Windows version.
9Do not install into a path that contains spaces. The installation program should set the
10WXWIN environment variable, which will be activated when your machine is rebooted.
11
12If there is no setup program, it will come as a series of .zip
13files:
14
15wx200gen.zip Generic source code and samples (required)
16wx200msw.zip Windows-specific source code and samples (required)
17wx200doc.zip Documentation source code (not required)
18wx200hlp.zip WinHelp documentation
19wx200pdf.zip Acrobat PDF documentation
20wx200htm.zip HTML documentation
21wx200vc.zip MS VC++ 5.0 project files
22wx200cw.zip Metrowerks CodeWarrior project files
23
24Unarchive the required files plus any optional documentation
25files into a suitable directory such as c:\wx. Alter your
26WXWIN environment variable to point to this directory.
27
28Other add-on packages are available from the wxWindows Web site, such as:
29
30- glcanvas.zip. Use OpenGL in a wxWindows window.
31- ogl3.zip. Object Graphics Library: build network diagrams, CASE tools etc.
32- tex2rtf3.zip. Tex2RTF: create Windows Help, HTML, and Word RTF files from
33 the same document source.
34
35Compilation
36-----------
37
38At present, wxWindows compiles with VC++ 4.0/5.0/6.0,
39BC++ 4.5/5.0, Cygwin b19/b20, and Mingw32. It may compile
40with 16-bit compilers (BC++ and VC++ 1.5) but this hasn't
41been tested lately.
42
43Visual C++ 4.0/5.0/6.0 compilation
44----------------------------------
45
46Using project files:
47
481. Unarchive wx200vc.zip, the VC++ 5 project makefiles.
492. Open src/wxvc.dsp, set Debug or Release configuration, and
50 compile. This will produce lib/wxvc.lib or lib/wxvc_debug.lib.
513. Open a sample project file, choose a configuration, and compile.
52 The project files don't use precompiled headers, to save
53 space, but you can switch PCH compiling on for greater speed.
54
55Using makefiles:
56
571. Make sure your WXWIN variable is set.
582. Change directory to wx\src\msw. Type 'nmake -f makefile.vc' to
59 make the wxWindows core library.
603. Change directory to wx\samples and type 'nmake -f makefile.vc'
61 to make all the samples. You can also make them individually.
62
63To build the release version using makefiles, add FINAL=1 to your
64nmake invocation, both when building the library and for samples.
65
66Use the 'clean' target to clean all objects, libraries and
67executables.
68
69To build the DLL version using makefiles:
70
711. Change directory to wx\src\msw. Type 'nmake -f makefile.vc dll pch'
72 to make both a suitable DLL and import library, and to build a
73 suitable precompiled header file for compiling applications.
742. Invoke a sample makefile with 'nmake -f makefile.vc WXUSINGDLL=1'.
75
76Note (1): if you wish to use templates, please edit
77include\wx\msw\setup.h and set wxUSE_DEBUG_NEW_ALWAYS to 0.
78Without this, the redefinition of 'new' will cause problems in
79the headers. Alternatively, #undef new before including template headers.
80
81Note (2): libraries and applications generated with makefiles and
82project files are unlikely to be compatible, so use one method or
83the other.
84
85Visual C++ 1.5 compilation
86--------------------------
87
881. Make sure your WXWIN variable is set, and uses the FAT (short
89 name) form.
902. Change directory to wx\src\msw. Type 'nmake -f makefile.dos' to
91 make the wxWindows core library.
923. Change directory to a sample, such as wx\samples\minimal, and
93 type 'nmake -f makefile.dos'.
94
95Add FINAL=1 to your makefile invocation to build the release
96versions of the library and samples.
97
98Use the 'clean' target to clean all objects, libraries and
99executables.
100
101Borland C++ 4.5/5.0 compilation
102-------------------------------
103
1041. Make sure your WXWIN variable is set, and uses the FAT (short
105 name) form if doing a 16-bit compile.
1062. Change directory to wx\src\msw. Type 'make -f makefile.b32' to
107 make the wxWindows core library. Ignore the warnings about
108 'XXX' not found in library.
1093. Change directory to a sample such as minimal, and type
110 'make -f makefile.b32'.
1114. For release versions, recompile wxWindows and samples using
112 'make -f makefile.b32 clean'
113 'make -f makefile.b32 FINAL=1'
114 for the library and samples.
115
116Note: the wxWindows library and (some) samples compile in 16-bit mode
117using makefile.bcc, but at present the wxWindows resource system is switched
118off in this mode. See issues.txt for details.
119
120Borland C++Builder compilation
121------------------------------
122
123C++Builder compilation is the same as for Borland C++ above.
124
125Tested with C++Builder 1.0 and 3.0. Only makefiles are currently
126supplied.
127
128Watcom C++ 10.6 compilation
129---------------------------
130
1311. Make sure your WXWIN variable is set, and uses the FAT (short
132 name) form.
1332. Change directory to wx\src\msw. Type 'wmake -f makefile.wat' to
134 make the wxWindows core library.
1353. Change directory to wx\samples\minimal and type 'wmake -f makefile.wat'
136 to make this sample.
137
138Metrowerks CodeWarrior compilation
139----------------------------------
140
1411. Downloaded and unzip wx200cw.zip.
1422. Load the make_cw.mcp project in wx\src, and compile.
1433. Load the make_cw.mcp project in wx\samples\minimal, and compile.
144 Further project files for samples will be available in due
145 course.
146
147NOTES:
148
149(a) Unfortunately CodeWarrior support is broken in this
150release. Stefan Csomor (csomor@advancedconcepts.ch) will rectify this shortly.
151(b) You need CodeWarrior Pro 4 plus the patches to 4.1 from the
152Metrowerks Web site.
153
154Symantec C++ compilation
155------------------------
156
1571. Make sure your WXWIN variable is set, and uses the FAT (short
158 name) form.
1592. Edit setup.h and set wxUSE_DRAG_AND_DROP to 0.
1603. Change directory to wx\src\msw. Type 'make -f makefile.sc' to
161 make the wxWindows core library.
1624. Change directory to wx\samples\minimal and type 'make -f makefile.sc'
163 to make this sample.
164
165Note: the minimal sample doesn't link properly ('Error: no
166start address').
16732-bit compilation only (partially) supported at present, using SC++ 6.1.
168Some functionality is missing using this compiler (see makefile).
169Add -D__WIN95__ if your SC++ has Windows 95 support, and ignore
170Step (2). 16-bit compilation is left as an excercise for the user!
171
172Salford C++ compilation
173-----------------------
174
1751. Make sure your WXWIN variable is set, and uses the FAT (short
176 name) form.
1772. Edit SALFORDDIR and RESOURCEDIR in src/makesl.env as per
178 notes.
1793. Change directory to wx\src\msw. Type 'mk32 -f makefile.sl all' to
180 make the wxWindows core library.
1814. Change directory to wx\samples\minimal and type 'mk32 -f makefile.sl'
182 to make this sample.
183
184Unfortunately, Salford C++ seems to have problems with its code generation for
185operations on objects, as seen in wxFrame::OnMenuHighlight
186(minimal sample) or wxWindow::SetValidator (mdi sample). Also the
187the debugging version of the library is 90MB, with samples coming in
188at 40MB :-) However, wxWindows at least makes a good test suite for
189improving the compiler.
190
191Cygwin b19/b20/Mingw32 compilation
192----------------------------------
193
194wxWindows 2.0 supports Cygwin (formerly GnuWin32) b19, b20, Mingw32, and Mingw32/EGCS.
195
196Thanks are due to Keith Garry Boyce (garp@opustel.com) and Cygnus for making
197it all possible.
198
199From wxWindows 2.0 beta 9, both Cygwin and Mingw32 (the minimal
200distribution of Cygwin) can be used with the same makefiles.
201
202Here are the steps required:
203
204- Retrieve and install the latest beta of Cygwin, or Mingw32, as per the
205 instructions with either of these packages.
206
207- If using Mingw32 (including the EGCS variant), you need some
208 extra files to use the wxWindows makefiles. You can find these
209 files in ports/mingw32 on the ftp site or CD-ROM, as extra.zip.
210 These should be extracted to the Mingw32 directory.
211 If you have already have downloaded bison, flex, make, rm, mv
212 from elsewhere, you won't need this.
213
214 IMPORTANT: also see mingw32.txt in this directory (docs/msw)
215 about a fix that has to be applied to a Mingw32 header file.
216
217- Modify the file wx/src/cygnus.bat (or mingw32.bat or mingegcs.bat)
218 to set up appropriate variables, if necessary mounting drives.
219 Run it before compiling.
220
221- For Cygwin, make sure there's a \tmp directory on your
222 Windows drive or bison will crash.
223
224- Edit wx/src/makeg95.env and search for MINGW32. Take note of
225 the comments for adjusting settings to suit Cygwin or
226 Mingw32. Basically, this is just a case of adding the __MINGW32__ symbol
227 to OPTIONS for Mingw32, or removing it for Cygnus Cygwin.
228 For Mingw32/EGCS, add both __MINGW32__ and __EGCS__.
229 You may need to remove -loldnames from WINLIBS for Mingw32, or add it for
230 Cygwin.
231
232- Mingw32 may not support winsock.h, so comment out
233 socket-related files in src/msw/makefile.g95.
234
235- Use the makefile.g95 files for compiling wxWindows and samples,
236 e.g.:
237 > cd c:\wx\src\msw
238 > make -f makefile.g95
239 > cd c:\wx\samples\minimal
240 > make -f makefile.g95
241
242- Use the 'strip' command to reduce executable size.
243
244- With Cygnus Cygwin, you can invoke gdb --nw myfile.exe to
245 debug an executable. If there are memory leaks, they will be
246 flagged when the program quits.
247
248- If using GnuWin32 b18, you will need to copy windres.exe
249 from e.g. the Mingw32 distribution, to a directory in your path.
250
251All targets have 'clean' targets to allow removal of object files
252and other intermediate compiler files.
253
254Gotchas:
255
256- libwx.a is 48 MB or more - but much less if compiled with no
257 debug info (-g0) and level 4 optimization (-O4).
258- install.exe doesn't have built-in decompression because lzexpand.lib
259 isn't available with Cygwin. However, you can use it with external
260 decompression utilities.
261- Doesn't compile src/msw/ole files, so no drag and drop.
262
263References:
264
265 - The GNU-WIN32 site is at
266 http://www.cygnus.com/gnu-win32/
267 - Mingw32 is available at:
268 http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32/index.html
269 - See also http://web.ukonline.co.uk/julian.smart/wxwin/gnuwin32.htm
270
271TWIN32 and gcc on Linux
272-----------------------
273
274The wxWindows 2 for Windows port may be compiled using
275the TWIN32 emulator package from www.willows.com. However,
276TWIN32 is by no means finished so this should be taken as
277something to think about for the future, rather than
278a tool for writing products with.
279
280Use makefile.twn in much the same way as makefile.g95, as
281described above. Not all sample makefiles are supplied yet.
282
283For some reason, I found I had to copy TWIN32's Windows resource
284compiler (rc) to the current working directory for it to be found.
285
286General Notes
287-------------
288
289- Debugging: under Windows 95, debugging output isn't output in
290 the same way that it is under NT or Windows 3.1. Set
291 wxUSE_DBWIN32 to 1 if you wish to enable code to output debugging
292 info to an external debug monitor, such as Andrew Tucker's DBWIN32.
293 You can download DBWIN32 from:
294
295 http://ftp.digital.com/pub/micro/NT/WinSite/programr/dbwin32.zip
296
297 and it's also on the wxWindows CD-ROM under Packages.
298
299- If you are installing wxWindows 2 from CVS, you may find that
300 include/wx/msw/setup.h is missing. This is deliberate, to avoid
301 developers' different setup.h configurations getting confused.
302 Please copy setup0.h to setup.h before compiling.