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 concurretly. 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 currently
43 be installed, so you'd have to use local version of the library for that purpose.
44 For building three versions (one GTK, one Motif and a debug version of the GTK
45 source) you'd do this:
49 ../configure --with-motif
55 ../configure --with-gtk
61 ../configure --with-gtk --enable-debug_flag
65 * The most simple errors
66 ------------------------
68 For any configure errors: please look at config.log file which was generated
69 during configure run, it usually contains some useful information.
71 configure reports, that you don't have GTK 1.2 installed although you are
72 very sure you have. Well, you have installed it, but you also have another
73 version of the GTK installed, which you may need to remove including other
74 versions of glib (and its headers). Or maybe you installed it in non default
75 location and configure can't find it there, so please check that your PATH
76 variable includes the path to the correct gtk-config. Also check that your
77 LD_LIBRARY_PATH or equivalent variable contains the path to GTK+ libraries if
78 they were installed in a non default location.
80 You get errors from make: please use GNU make instead of the native make
81 program. Currently wxWindows can be built only with GNU make, BSD make and
82 Solaris make. Other versions might work or not (any which don't have VPATH
83 support definitely won't).
85 You get errors during compilation: The reason is that you probably have a
86 broken compiler, which includes a lot of old gcc versions. In particular, if
87 you use gcc 2.8 you have to disable optimsation as the compiler will give up
88 with an internal compiler error.
90 You get immediate segfault when starting any sample or application: This is
91 either due to having compiled the library with different flags or options than
92 your program - typically you might have the __WXDEBUG__ option set for the
93 library but not for your program - or due to using a broken compiler (and its
94 optimisation) such as gcc 2.8.
96 Linker complains about missing PROIO_yy_flex_alloc and similar symbols: you
97 probably have an old version of flex, 2.5.4 is recommended.
99 * The most simple program
100 -------------------------
102 Now create your super-application myfoo.app and compile anywhere with
104 gcc myfoo.cpp `wx-config --libs --cflags` -o myfoo
107 -----------------------
109 The Unix variants of wxWindows use GNU configure. If you have problems with your
110 make use GNU make instead.
112 If you have general problems with installation, read my homepage at
114 http://wesley.informatik.uni-freiburg.de/~wxxt
116 for newest information. If you still don't have any success, please send a bug
117 report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
118 YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF GTK, WXGTK, WHAT DISTRIBUTION
119 YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
122 -----------------------
124 wxWindows/GTK requires the GTK+ library to be installed on your system. It has
125 to be a stable version, preferebly version 1.2.10 (at least 1.2.3 is required,
126 1.2.7 is strongly recommended).
128 You can get the newest version of the GTK+ from the GTK homepage at:
132 We also mirror GTK+ at my ftp site. You'll find information about downloading
135 * Additional libraries
136 -----------------------
138 wxWindows/Gtk requires a thread library and X libraries known to work with threads.
139 This is the case on all commercial Unix-Variants and all Linux-Versions that are
140 based on glibc 2 except RedHat 5.0 which is broken in many aspects. As of writing
141 this, these Linux distributions have correct glibc 2 support:
149 You can disable thread support by running
151 ./configure --disable-threads
153 su <type root password>
158 NB: DO NOT COMPILE WXGTK WITH GCC 2.7 AND THREADS, SINCE ALL PROGRAMS WILL CRASH UPON
159 START-UP! Just always use egcs and be happy.
161 * Building wxGTK on OS/2
162 --------------------------
164 Please send comments and question about the OS/2 installation
165 to Andrea Venturoli <a.ventu@flashnet.it> and patches to
166 the wxWindows mailing list.
168 You'll need OS/2 Warp (4.00FP#6), X-Free86/2 (3.3.3 or newer),
169 GTK+ (1.2.5 or newer), emx (0.9d fix 1), flex (2.5.4), yacc (1.8),
170 korn shell (5.2.13), Autoconf (2.13), GNU file utilities (3.6),
171 GNU text utilities (1.3), GNU shell utilites (1.12), m4 (1.4),
172 sed (2.05), grep (2.0), Awk (3.0.3), GNU Make (3.76.1).
174 Open an OS/2 prompt and switch to the directory above.
175 First set some global environment variables we need:
177 SET CXXFLAGS=-Zmtd -D__ST_MT_ERRNO__
178 SET CFLAGS=-Zmtd -D__ST_MT_ERRNO__
182 Notice you can choose whatever you want, if you don't like OS2X.
184 Now, run autoconf in the main directory and in the samples, demos
185 and utils subdirectory. This will generate the OS/2 specific
186 versions of the configure scripts. Now run
190 If you have pthreads library installed, but have a gtk version
191 which does not yet support threading, you need to explicitly
192 diable threading by using the option --disable-threads.
194 Note that configure assumes your flex will generate files named
195 "lexyy.c", not "lex.yy.c". If you have a version which does
196 generate "lex.yy.c", you need to manually change the generated
199 * Building wxGTK on SGI
200 --------------------------
202 Using the SGI native compilers, it is recommended that you
203 also set CFLAGS and CXXFLAGS before running configure. These
207 CXXFLAGS="-mips3 -n32"
209 This is essential if you want to use the resultant binaries
210 on any other machine than the one it was compiled on. If you
211 have a 64bit machine (Octane) you should also do this to ensure
212 you don't accidently build the libraries as 64bit (which is
215 The SGI native compiler support has only been tested on Irix 6.5.
217 * Create your configuration
218 -----------------------------
223 If you want to use system's C and C++ compiler,
224 set environment variables CC and CCC as
228 % ./configure options
230 to see all the options please use:
234 It is recommended to build wxWindows in another directory (maybe a
235 subdirectory of your wxWindows installation) as this allows you to
236 have multiple configurations (for example, debug and release or GTK
237 and Motif) simultaneously.
243 Given below are the commands to change the default behaviour,
244 i.e. if it says "--disable-threads" it means that threads
245 are enabled by default.
247 Normally, you won't have to choose a toolkit, because when
248 you download wxGTK, it will default to --with-gtk etc. But
249 if you use all of our CVS repository you have to choose a
250 toolkit. You must do this by running configure with either of:
252 --with-gtk Use the GIMP ToolKit (GTK). Default.
254 --with-motif Use either Motif or Lesstif
255 Configure will look for both.
257 The following options handle the kind of library you want to build.
259 --disable-threads Compile without thread support.
261 --disable-shared Do not create shared libraries, but
262 build static libraries instead.
264 --disable-optimise Do not optimise the code. Can
265 sometimes be useful for debugging
266 and is required on some architectures
267 such as Sun with gcc 2.8.X which
268 would otherwise produce segvs.
270 --enable-profile Add profiling info to the object
271 files. Currently broken, I think.
273 --enable-no_rtti Enable compilation without creation of
274 C++ RTTI information in object files.
275 This will speed-up compilation and reduce
278 --enable-no_exceptions Enable compilation without creation of
279 C++ exception information in object files.
280 This will speed-up compilation and reduce
281 binary size. Also fewer crashes during the
282 actual compilation...
284 --enable-no_deps Enable compilation without creation of
285 dependency information.
287 --enable-permissive Enable compilation without creation of
288 giving erros as soon as you compile with
289 Solaris' ANSI-defying headers.
291 --enable-mem_tracing Add built-in memory tracing.
293 --enable-dmalloc Use the dmalloc memory debugger.
294 Read more at www.letters.com/dmalloc/
296 --enable-debug_info Add debug info to object files and
297 executables for use with debuggers
298 such as gdb (or its many frontends).
300 --enable-debug_flag Define __DEBUG__ and __WXDEBUG__ when
301 compiling. This enable wxWindows' very
302 useful internal debugging tricks (such
303 as automatically reporting illegal calls)
304 to work. Note that program and library
305 must be compiled with the same debug
311 When producing an executable that is linked statically with wxGTK
312 you'll be surprised at its immense size. This can sometimes be
313 drastically reduced by removing features from wxWindows that
314 are not used in your program. The most relevant such features
317 --with-odbc Enables ODBC code. This is disabled
318 by default because iODBC is under the
319 L-GPL license which is less liberal than
322 --without-libpng Disables PNG image format code.
324 --without-libjpeg Disables JPEG image format code.
326 --without-libtiff Disables TIFF image format code.
328 --disable-pnm Disables PNM image format code.
330 --disable-gif Disables GIF image format code.
332 --disable-pcx Disables PCX image format code.
334 --disable-iff Disables IFF image format code.
336 --disable-resources Disables the use of *.wxr type resources.
338 --disable-threads Disables threads. Will also disable sockets.
340 --disable-sockets Disables sockets.
342 --disable-dnd Disables Drag'n'Drop.
344 --disable-clipboard Disables Clipboard.
346 --disable-serial Disables object instance serialiasation.
348 --disable-streams Disables the wxStream classes.
350 --disable-file Disables the wxFile class.
352 --disable-textfile Disables the wxTextFile class.
354 --disable-intl Disables the internationalisation.
356 --disable-validators Disables validators.
358 --disable-accel Disables accelerators support.
360 Apart from disabling certain features you can very often "strip"
361 the program of its debugging information resulting in a significant
367 The following must be done in the base directory (e.g. ~/wxGTK
368 or ~/wxWin or whatever)
370 Now the makefiles are created (by configure) and you can compile
371 the library by typing:
375 make yourself some coffee, as it will take some time. On an old
376 386SX possibly two weeks. During compilation, you'll get a few
377 warning messages depending in your compiler.
379 If you want to be more selective, you can change into a specific
380 directiry and type "make" there.
382 Then you may install the library and it's header files under
383 /usr/local/include/wx and /usr/local/lib respectively. You
384 have to log in as root (i.e. run "su" and enter the root
389 You can remove any traces of wxWindows by typing
393 If you want to save disk space by removing unnecessary
398 in the various directories will do the work for you.
400 * Creating a new Project
401 --------------------------
403 1) The first way uses the installed libraries and header files
404 automatically using wx-config
406 gcc myfoo.cpp `wx-config --cflags --libs` -o myfoo
408 Using this way, a make file for the minimal sample would look
414 $(CC) -o minimal minimal.o `wx-config --libs`
416 minimal.o: minimal.cpp mondrian.xpm
417 $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
422 This is certain to become the standard way unless we decide
425 2) The other way creates a project within the source code
426 directories of wxWindows. For this endeavour, you'll need
427 GNU autoconf version 2.14 and add an entry to your Makefile.in
428 to the bottom of the configure.in script and run autoconf
429 and configure before you can type make.
431 ----------------------
433 In the hope that it will be useful,