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: wxGTK 2.3.0, egcs 1.1.1, Redhat 6.2 !!!
7 -----------------------
9 If you compile wxWindows on Linux for the first time and don't like to read
10 install instructions just do (in the base dir):
12 > ./configure --with-gtk
14 > su <type root password>
19 Afterwards you can continue with
22 > su <type root password>
27 If you want to remove wxWindows on Unix you can do this:
29 > su <type root password>
37 If you want to do some more serious cross-platform programming with wxWindows,
38 such as for GTK and Motif, you can now build two complete libraries and use
39 them concurrently. For this end, you have to create a directory for each build
40 of wxWindows - you may also want to create different versions of wxWindows
41 and test them concurrently. Most typically, this would be a version configured
42 with --enable-debug_flag and one without. Note, that only one build can
43 currently be installed, so you'd have to use local version of the library for
46 For building three versions (one GTK, one Motif and a debug version of the GTK
47 source) you'd do this:
51 ../configure --with-motif
57 ../configure --with-gtk
63 ../configure --with-gtk --enable-debug_flag
67 * The most simple errors
68 ------------------------
70 For any configure errors: please look at config.log file which was generated
71 during configure run, it usually contains some useful information.
73 configure reports, that you don't have GTK 1.2 installed although you are
74 very sure you have. Well, you have installed it, but you also have another
75 version of the GTK installed, which you may need to remove including other
76 versions of glib (and its headers). Or maybe you installed it in non default
77 location and configure can't find it there, so please check that your PATH
78 variable includes the path to the correct gtk-config. Also check that your
79 LD_LIBRARY_PATH or equivalent variable contains the path to GTK+ libraries if
80 they were installed in a non default location.
82 You get errors from make: please use GNU make instead of the native make
83 program. Currently wxWindows can be built only with GNU make, BSD make and
84 Solaris make. Other versions might work or not (any which don't have VPATH
85 support definitely won't).
87 You get errors during compilation: The reason is that you probably have a
88 broken compiler, which includes a lot of old gcc versions. In particular, if
89 you use gcc 2.8 you have to disable optimisation as the compiler will give up
90 with an internal compiler error.
92 You get immediate segfault when starting any sample or application: This is
93 either due to having compiled the library with different flags or options than
94 your program - typically you might have the __WXDEBUG__ option set for the
95 library but not for your program - or due to using a broken compiler (and its
96 optimisation) such as gcc 2.8.
98 Linker complains about missing PROIO_yy_flex_alloc and similar symbols: you
99 probably have an old version of flex, 2.5.4 is recommended.
101 * The most simple program
102 -------------------------
104 Now create your super-application myfoo.app and compile anywhere with
106 gcc myfoo.cpp `wx-config --libs --cflags` -o myfoo
109 -----------------------
111 The Unix variants of wxWindows use GNU configure. If you have problems with your
112 make use GNU make instead.
114 If you have general problems with installation, read my homepage at
116 http://wesley.informatik.uni-freiburg.de/~wxxt
118 for newest information. If you still don't have any success, please send a bug
119 report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
120 YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF GTK, WXGTK, WHAT DISTRIBUTION
121 YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
124 -----------------------
126 wxWindows/GTK requires the GTK+ library to be installed on your system. It has
127 to be a stable version, preferably version 1.2.10 (at least 1.2.3 is required,
128 1.2.7 is strongly recommended).
130 You can get the newest version of the GTK+ from the GTK homepage at:
134 We also mirror GTK+ at my ftp site. You'll find information about downloading
137 * Additional libraries
138 -----------------------
140 wxWindows/Gtk requires a thread library and X libraries known to work with threads.
141 This is the case on all commercial Unix-Variants and all Linux-Versions that are
142 based on glibc 2 except RedHat 5.0 which is broken in many aspects. As of writing
143 this, these Linux distributions have correct glibc 2 support:
151 You can disable thread support by running
153 ./configure --disable-threads
155 su <type root password>
160 NB: DO NOT COMPILE WXGTK WITH GCC 2.7 AND THREADS, SINCE ALL PROGRAMS WILL CRASH UPON
161 START-UP! Just always use egcs and be happy.
163 * Building wxGTK on OS/2
164 --------------------------
166 Please send comments and question about the OS/2 installation
167 to Andrea Venturoli <a.ventu@flashnet.it> and patches to
168 the wxWindows mailing list.
170 You'll need OS/2 Warp (4.00FP#6), X-Free86/2 (3.3.3 or newer),
171 GTK+ (1.2.5 or newer), emx (0.9d fix 1), flex (2.5.4), yacc (1.8),
172 korn shell (5.2.13), Autoconf (2.13), GNU file utilities (3.6),
173 GNU text utilities (1.3), GNU shell utilites (1.12), m4 (1.4),
174 sed (2.05), grep (2.0), Awk (3.0.3), GNU Make (3.76.1).
176 Open an OS/2 prompt and switch to the directory above.
177 First set some global environment variables we need:
179 SET CXXFLAGS=-Zmtd -D__ST_MT_ERRNO__
180 SET CFLAGS=-Zmtd -D__ST_MT_ERRNO__
184 Notice you can choose whatever you want, if you don't like OS2X.
186 Now, run autoconf in the main directory and in the samples, demos
187 and utils subdirectory. This will generate the OS/2 specific
188 versions of the configure scripts. Now run
192 If you have pthreads library installed, but have a gtk version
193 which does not yet support threading, you need to explicitly
194 disable threading by using the option --disable-threads.
196 Note that configure assumes your flex will generate files named
197 "lexyy.c", not "lex.yy.c". If you have a version which does
198 generate "lex.yy.c", you need to manually change the generated
201 * Building wxGTK on SGI
202 --------------------------
204 Using the SGI native compilers, it is recommended that you
205 also set CFLAGS and CXXFLAGS before running configure. These
209 CXXFLAGS="-mips3 -n32"
211 This is essential if you want to use the resultant binaries
212 on any other machine than the one it was compiled on. If you
213 have a 64bit machine (Octane) you should also do this to ensure
214 you don't accidently build the libraries as 64bit (which is
217 The SGI native compiler support has only been tested on Irix 6.5.
219 * Create your configuration
220 -----------------------------
225 If you want to use system's C and C++ compiler,
226 set environment variables CC and CCC as
230 % ./configure options
232 to see all the options please use:
236 It is recommended to build wxWindows in another directory (maybe a
237 subdirectory of your wxWindows installation) as this allows you to
238 have multiple configurations (for example, debug and release or GTK
239 and Motif) simultaneously.
245 Given below are the commands to change the default behaviour,
246 i.e. if it says "--disable-threads" it means that threads
247 are enabled by default.
249 Normally, you won't have to choose a toolkit, because when
250 you download wxGTK, it will default to --with-gtk etc. But
251 if you use all of our CVS repository you have to choose a
252 toolkit. You must do this by running configure with either of:
254 --with-gtk Use the GIMP ToolKit (GTK). Default.
256 --with-motif Use either Motif or Lesstif
257 Configure will look for both.
259 The following options handle the kind of library you want to build.
261 --disable-threads Compile without thread support.
263 --disable-shared Do not create shared libraries, but
264 build static libraries instead.
266 --disable-optimise Do not optimise the code. Can
267 sometimes be useful for debugging
268 and is required on some architectures
269 such as Sun with gcc 2.8.X which
270 would otherwise produce segvs.
272 --enable-profile Add profiling info to the object
273 files. Currently broken, I think.
275 --enable-no_rtti Enable compilation without creation of
276 C++ RTTI information in object files.
277 This will speed-up compilation and reduce
280 --enable-no_exceptions Enable compilation without creation of
281 C++ exception information in object files.
282 This will speed-up compilation and reduce
283 binary size. Also fewer crashes during the
284 actual compilation...
286 --enable-no_deps Enable compilation without creation of
287 dependency information.
289 --enable-permissive Enable compilation without checking for strict
290 ANSI conformance. Useful to prevent the build
291 dying with errors as soon as you compile with
292 Solaris' ANSI-defying headers.
294 --enable-mem_tracing Add built-in memory tracing.
296 --enable-dmalloc Use the dmalloc memory debugger.
297 Read more at www.letters.com/dmalloc/
299 --enable-debug_info Add debug info to object files and
300 executables for use with debuggers
301 such as gdb (or its many frontends).
303 --enable-debug_flag Define __DEBUG__ and __WXDEBUG__ when
304 compiling. This enable wxWindows' very
305 useful internal debugging tricks (such
306 as automatically reporting illegal calls)
307 to work. Note that program and library
308 must be compiled with the same debug
314 When producing an executable that is linked statically with wxGTK
315 you'll be surprised at its immense size. This can sometimes be
316 drastically reduced by removing features from wxWindows that
317 are not used in your program. The most relevant such features
320 --with-odbc Enables ODBC code. This is disabled
321 by default because iODBC is under the
322 L-GPL license which is less liberal than
325 --without-libpng Disables PNG image format code.
327 --without-libjpeg Disables JPEG image format code.
329 --without-libtiff Disables TIFF image format code.
331 --disable-pnm Disables PNM image format code.
333 --disable-gif Disables GIF image format code.
335 --disable-pcx Disables PCX image format code.
337 --disable-iff Disables IFF image format code.
339 --disable-resources Disables the use of *.wxr type resources.
341 --disable-threads Disables threads. Will also disable sockets.
343 --disable-sockets Disables sockets.
345 --disable-dnd Disables Drag'n'Drop.
347 --disable-clipboard Disables Clipboard.
349 --disable-serial Disables object instance serialisation.
351 --disable-streams Disables the wxStream classes.
353 --disable-file Disables the wxFile class.
355 --disable-textfile Disables the wxTextFile class.
357 --disable-intl Disables the internationalisation.
359 --disable-validators Disables validators.
361 --disable-accel Disables accelerators support.
363 Apart from disabling certain features you can very often "strip"
364 the program of its debugging information resulting in a significant
370 The following must be done in the base directory (e.g. ~/wxGTK
371 or ~/wxWin or whatever)
373 Now the makefiles are created (by configure) and you can compile
374 the library by typing:
378 make yourself some coffee, as it will take some time. On an old
379 386SX possibly two weeks. During compilation, you'll get a few
380 warning messages depending in your compiler.
382 If you want to be more selective, you can change into a specific
383 directory and type "make" there.
385 Then you may install the library and its header files under
386 /usr/local/include/wx and /usr/local/lib respectively. You
387 have to log in as root (i.e. run "su" and enter the root
392 You can remove any traces of wxWindows by typing
396 If you want to save disk space by removing unnecessary
401 in the various directories will do the work for you.
403 * Creating a new Project
404 --------------------------
406 1) The first way uses the installed libraries and header files
407 automatically using wx-config
409 gcc myfoo.cpp `wx-config --cflags --libs` -o myfoo
411 Using this way, a make file for the minimal sample would look
417 $(CC) -o minimal minimal.o `wx-config --libs`
419 minimal.o: minimal.cpp mondrian.xpm
420 $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
425 This is certain to become the standard way unless we decide
428 2) The other way creates a project within the source code
429 directories of wxWindows. For this endeavour, you'll need
430 GNU autoconf version 2.14 and add an entry to your Makefile.in
431 to the bottom of the configure.in script and run autoconf
432 and configure before you can type make.
434 ----------------------
436 In the hope that it will be useful,