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 Unix 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 If you want to remove wxWindows on Unix you can do this:
43 su <type root password>
51 If you want to do some more serious cross-platform programming with wxWindows,
52 such as for GTK and Motif, you can now build two complete libraries and use
53 them concurretly. For this end, you have to create a directory for each build
54 of wxWindows - you may also want to create different versions of wxWindows
55 and test them concurrently. Most typically, this would be a version configured
56 with --enable-debug_flag and one without. Note, that only one build can currently
57 be installed, so you'd have to use local version of the library for that purpose.
58 For building three versions (one GTK, one WINE and a debug version of the WINE
59 source) you'd do this:
63 ../configure --with-motif
69 ../configure --with-wine
75 ../configure --with-wine --enable-debug_flag
79 * The most simple errors
80 ------------------------
82 wxWINE doesn't work yet as WINE isn't really up to the task yet.
84 You get errors during compilation: The reason is that you probably have a broken
85 compiler, which includes almost everything that is called gcc. If you use gcc 2.8
86 you have to disable optimsation as the compiler will give up with an internal
89 If there is just any way for you to use egcs, use egcs. We cannot fix gcc.
91 You get immediate segfault when starting any sample or application: This is either
92 due to having compiled the library with different flags or options than your program -
93 typically you might have the __WXDEBUG__ option set for the library but not for your
94 program - or due to using a broken compiler (and its optimisation) such as GCC 2.8.
96 * The most simple program
97 -------------------------
99 Now create your super-application myfoo.app and compile anywhere with
101 g++ myfoo.cpp `wx-config --libs --cflags` -o myfoo
104 -----------------------
106 The Unix variants of wxWindows use GNU configure. If you have problems with your
107 make use GNU make instead.
109 If you have general problems with installation, read my homepage at
111 http://wesley.informatik.uni-freiburg.de/~wxxt
113 for newest information. If you still don't have any success, please send a bug
114 report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
115 YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF WINE, WXWINE, WHAT DISTRIBUTION
116 YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
119 -----------------------
121 wxWindows/WINE requires the WINE library to be installed on your system.
123 You can get the newest version of the WINE from the WINE homepage at:
125 http://www.winehq.com
127 * Create your configuration
128 -----------------------------
133 If you want to use system's C and C++ compiler,
134 set environment variables CC and CCC as
138 % ./configure options
140 to see all the options please use:
144 The basic philosophy is that if you want to use different
145 configurations, like a debug and a release version,
146 or use the same source tree on different systems,
147 you have only to change the environment variable OSTYPE.
148 (Sadly this variable is not set by default on some systems
149 in some shells - on SGI's for example). So you will have to
150 set it there. This variable HAS to be set before starting
151 configure, so that it knows which system it tries to
154 Configure will complain if the system variable OSTYPE has
155 not been defined. And Make in some circumstances as well...
161 Given below are the commands to change the default behaviour,
162 i.e. if it says "--disable-threads" it means that threads
163 are enabled by default.
165 Many of the confiugre options have been thoroughly tested
166 in wxWindows snapshot 6, but not yet all (ODBC not).
168 You must do this by running configure with either of:
170 --with-wine Use the WINE library
172 The following options handle the kind of library you want to build.
174 --enable-threads Compile without thread support. Threads
175 support is also required for the
178 --disable-shared Do not create shared libraries.
180 --disable-optimise Do not optimise the code. Can
181 sometimes be useful for debugging
182 and is required on some architectures
183 such as Sun with gcc 2.8.X which
184 would otherwise produce segvs.
186 --enable-profile Add profiling info to the object
187 files. Currently broken, I think.
189 --enable-no_rtti Enable compilation without creation of
190 C++ RTTI information in object files.
191 This will speed-up compilation and reduce
194 --enable-no_exceptions Enable compilation without creation of
195 C++ exception information in object files.
196 This will speed-up compilation and reduce
197 binary size. Also fewer crashes during the
198 actual compilation...
200 --enable-mem_tracing Add built-in memory tracing.
202 --enable-dmalloc Use the dmalloc memory debugger.
203 Read more at www.letters.com/dmalloc/
205 --enable-debug_info Add debug info to object files and
206 executables for use with debuggers
207 such as gdb (or its many frontends).
209 --enable-debug_flag Define __DEBUG__ and __WXDEBUG__ when
210 compiling. This enable wxWindows' very
211 useful internal debugging tricks (such
212 as automatically reporting illegal calls)
213 to work. Note that program and library
214 must be compiled with the same debug
220 Many of the confiugre options have been thoroughly tested
221 in wxWindows snapshot 6, but not yet all (ODBC not).
223 When producing an executable that is linked statically with wxGTK
224 you'll be surprised at its immense size. This can sometimes be
225 drastically reduced by removing features from wxWindows that
226 are not used in your program. The most relevant such features
229 --without-libpng Disables PNG image format code.
231 --without-libjpeg Disables JPEG image format code.
233 { --without-odbc Disables ODBC code. Not yet. }
235 --disable-resources Disables the use of *.wxr type
238 --disable-threads Disables threads. Will also
241 --disable-sockets Disables sockets.
243 --disable-dnd Disables Drag'n'Drop.
245 --disable-clipboard Disables Clipboard.
247 --disable-serial Disables object instance serialiasation.
249 --disable-streams Disables the wxStream classes.
251 --disable-file Disables the wxFile class.
253 --disable-textfile Disables the wxTextFile class.
255 --disable-intl Disables the internationalisation.
257 --disable-validators Disables validators.
259 --disable-accel Disables accel.
261 Apart from disabling certain features you can very often "strip"
262 the program of its debugging information resulting in a significant
268 The following must be done in the base directory (e.g. ~/wxGTK
269 or ~/wxWin or whatever)
271 Now the makefiles are created (by configure) and you can compile
272 the library by typing:
276 make yourself some coffee, as it will take some time. On an old
277 386SX possibly two weeks. During compilation, you'll get a few
278 warning messages depending in your compiler.
280 If you want to be more selective, you can change into a specific
281 directiry and type "make" there.
283 Then you may install the library and it's header files under
284 /usr/local/include/wx and /usr/local/lib respectively. You
285 have to log in as root (i.e. run "su" and enter the root
290 You can remove any traces of wxWindows by typing
294 If you want to save disk space by removing unnecessary
299 in the various directories will do the work for you.
301 * Creating a new Project
302 --------------------------
304 1) The first way uses the installed libraries and header files
305 automatically using wx-config
307 g++ myfoo.cpp `wx-config --libs` `wx-config --cflags` -o myfoo
309 Using this way, a make file for the minimal sample would look
315 $(CC) -o minimal minimal.o `wx-config --libs`
317 minimal.o: minimal.cpp mondrian.xpm
318 $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
323 This is certain to become the standard way unless we decide
326 2) The other way creates a project within the source code
327 directories of wxWindows. For this endeavour, you'll need
328 the usual number of GNU tools, at least
330 GNU automake version 1.4
331 GNU autoheader version 2.14
332 GNU autoconf version 2.14
333 GNU libtool version 1.3
340 and if you have all this then you probably know enough to
341 go ahead yourself :-)
343 ----------------------
345 In the hope that it will be useful,
347 Robert Roebling <roebling@sun2.ruf.uni-freiburg.de>