2 !!! When sending bug reports tell us what version of wxWindows you are
3 using (including the beta) and what compiler on what system. One
4 example: wxWINE 2.1 snapshot 6, egcs 1.1.1, Redhat 5.0 !!!
9 Most C++ compilers cannot compile the WINE sources yet (this includes
10 all versions of g++ and ecgs) so you have to make a minimal change
11 and recompile all of WINE in order to get anywhere.
13 This change has do be applied to the /include/windef.h file, line 59
14 in the section "Calling convention defintions", where the sources
19 which has to be changed into
23 After this change, you'll have to recompile all of WINE without
24 forgetting to install it. The direct consequence of this change
25 is that the Win32 binary emulator won't work anymore, as the
26 change disables the Windows native calling convention.
28 * The most simple case
29 -----------------------
31 If you compile wxWindows on Linux for the first time and don't like to read
32 install instructions just do (in the base dir):
34 > ./configure --with-wine
36 > su <type root password>
41 On all variants of Unix except Linux (and maybe except *BSD), shared libraries
42 are not supportet out of the box due to the utter stupidity of libtool, so you'll
43 have to do this to get shared library support:
45 > ./configure --with-wine --disable-static --enable-shared
47 Then you'll have to edit the wrongly created libtool script. There are two
48 important entries with respect to shared library creation, which are
50 archive_cmds="\$LD -shared ....
51 archive_expsym_cmds="\$LD -shared ....
53 which should be something like
55 archive_cmds="\$CC -shared ....
56 archive_expsym_cmds="\$CC -shared ....
58 Afterwards you can continue with
61 > su <type root password>
66 If you want to remove wxWindows on Unix you can do this:
68 > su <type root password>
76 If you want to do some more serious cross-platform programming with wxWindows,
77 such as for GTK and Motif, you can now build two complete libraries and use
78 them concurretly. For this end, you have to create a directory for each build
79 of wxWindows - you may also want to create different versions of wxWindows
80 and test them concurrently. Most typically, this would be a version configured
81 with --enable-debug_flag and one without. Note, that only one build can currently
82 be installed, so you'd have to use local version of the library for that purpose.
83 For building three versions (one GTK, one WINE and a debug version of the WINE
84 source) you'd do this:
88 ../configure --with-motif
94 ../configure --with-wine
100 ../configure --with-wine --enable-debug_flag
104 * The most simple errors
105 ------------------------
107 wxWINE doesn't work yet as WINE isn't really up to the task yet.
109 You get errors during compilation: The reason is that you probably have a broken
110 compiler, which includes almost everything that is called gcc. If you use gcc 2.8
111 you have to disable optimsation as the compiler will give up with an internal
114 If there is just any way for you to use egcs, use egcs. We cannot fix gcc.
116 You get immediate segfault when starting any sample or application: This is either
117 due to having compiled the library with different flags or options than your program -
118 typically you might have the __WXDEBUG__ option set for the library but not for your
119 program - or due to using a broken compiler (and its optimisation) such as GCC 2.8.
121 * The most simple program
122 -------------------------
124 Now create your super-application myfoo.app and compile anywhere with
126 g++ myfoo.cpp `wx-config --libs --cflags` -o myfoo
129 -----------------------
131 The Unix variants of wxWindows use GNU configure. If you have problems with your
132 make use GNU make instead.
134 If you have general problems with installation, read my homepage at
136 http://wesley.informatik.uni-freiburg.de/~wxxt
138 for newest information. If you still don't have any success, please send a bug
139 report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
140 YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF WINE, WXWINE, WHAT DISTRIBUTION
141 YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
144 -----------------------
146 wxWindows/WINE requires the WINE library to be installed on your system.
148 You can get the newest version of the WINE from the WINE homepage at:
150 http://www.winehq.com
152 * Create your configuration
153 -----------------------------
158 If you want to use system's C and C++ compiler,
159 set environment variables CC and CCC as
163 % ./configure options
165 to see all the options please use:
169 The basic philosophy is that if you want to use different
170 configurations, like a debug and a release version,
171 or use the same source tree on different systems,
172 you have only to change the environment variable OSTYPE.
173 (Sadly this variable is not set by default on some systems
174 in some shells - on SGI's for example). So you will have to
175 set it there. This variable HAS to be set before starting
176 configure, so that it knows which system it tries to
179 Configure will complain if the system variable OSTYPE has
180 not been defined. And Make in some circumstances as well...
186 Given below are the commands to change the default behaviour,
187 i.e. if it says "--disable-threads" it means that threads
188 are enabled by default.
190 Many of the confiugre options have been thoroughly tested
191 in wxWindows snapshot 6, but not yet all (ODBC not).
193 You must do this by running configure with either of:
195 --with-wine Use the WINE library
197 The following options handle the kind of library you want to build.
199 --enable-threads Compile without thread support. Threads
200 support is also required for the
203 --disable-shared Do not create shared libraries.
205 --disable-optimise Do not optimise the code. Can
206 sometimes be useful for debugging
207 and is required on some architectures
208 such as Sun with gcc 2.8.X which
209 would otherwise produce segvs.
211 --enable-profile Add profiling info to the object
212 files. Currently broken, I think.
214 --enable-no_rtti Enable compilation without creation of
215 C++ RTTI information in object files.
216 This will speed-up compilation and reduce
219 --enable-no_exceptions Enable compilation without creation of
220 C++ exception information in object files.
221 This will speed-up compilation and reduce
222 binary size. Also fewer crashes during the
223 actual compilation...
225 --enable-mem_tracing Add built-in memory tracing.
227 --enable-dmalloc Use the dmalloc memory debugger.
228 Read more at www.letters.com/dmalloc/
230 --enable-debug_info Add debug info to object files and
231 executables for use with debuggers
232 such as gdb (or its many frontends).
234 --enable-debug_flag Define __DEBUG__ and __WXDEBUG__ when
235 compiling. This enable wxWindows' very
236 useful internal debugging tricks (such
237 as automatically reporting illegal calls)
238 to work. Note that program and library
239 must be compiled with the same debug
245 Many of the confiugre options have been thoroughly tested
246 in wxWindows snapshot 6, but not yet all (ODBC not).
248 When producing an executable that is linked statically with wxGTK
249 you'll be surprised at its immense size. This can sometimes be
250 drastically reduced by removing features from wxWindows that
251 are not used in your program. The most relevant such features
254 --without-libpng Disables PNG image format code.
256 --without-libjpeg Disables JPEG image format code.
258 { --without-odbc Disables ODBC code. Not yet. }
260 --disable-resources Disables the use of *.wxr type
263 --disable-threads Disables threads. Will also
266 --disable-sockets Disables sockets.
268 --disable-dnd Disables Drag'n'Drop.
270 --disable-clipboard Disables Clipboard.
272 --disable-serial Disables object instance serialiasation.
274 --disable-streams Disables the wxStream classes.
276 --disable-file Disables the wxFile class.
278 --disable-textfile Disables the wxTextFile class.
280 --disable-intl Disables the internationalisation.
282 --disable-validators Disables validators.
284 --disable-accel Disables accel.
286 Apart from disabling certain features you can very often "strip"
287 the program of its debugging information resulting in a significant
293 The following must be done in the base directory (e.g. ~/wxGTK
294 or ~/wxWin or whatever)
296 Now the makefiles are created (by configure) and you can compile
297 the library by typing:
301 make yourself some coffee, as it will take some time. On an old
302 386SX possibly two weeks. During compilation, you'll get a few
303 warning messages depending in your compiler.
305 If you want to be more selective, you can change into a specific
306 directiry and type "make" there.
308 Then you may install the library and it's header files under
309 /usr/local/include/wx and /usr/local/lib respectively. You
310 have to log in as root (i.e. run "su" and enter the root
315 You can remove any traces of wxWindows by typing
319 If you want to save disk space by removing unnecessary
324 in the various directories will do the work for you.
326 * Creating a new Project
327 --------------------------
329 1) The first way uses the installed libraries and header files
330 automatically using wx-config
332 g++ myfoo.cpp `wx-config --libs` `wx-config --cflags` -o myfoo
334 Using this way, a make file for the minimal sample would look
340 $(CC) -o minimal minimal.o `wx-config --libs`
342 minimal.o: minimal.cpp mondrian.xpm
343 $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
348 This is certain to become the standard way unless we decide
351 2) The other way creates a project within the source code
352 directories of wxWindows. For this endeavour, you'll need
353 the usual number of GNU tools, at least
355 GNU automake version 1.4
356 GNU autoheader version 2.14
357 GNU autoconf version 2.14
358 GNU libtool version 1.3
365 and if you have all this then you probably know enough to
366 go ahead yourself :-)
368 ----------------------
370 In the hope that it will be useful,
372 Robert Roebling <roebling@sun2.ruf.uni-freiburg.de>