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: wxMotif 2.1 beta 6, egcs 1.1.1, Redhat 5.0 !!!
7 -----------------------
9 If you compile wxWindows on Unix for the first time and don't like to read
10 install instructions just do (in the base dir):
12 ./configure --with-motif
14 su <type root password>
19 If you want to remove wxWindows on Unix you can do this:
21 su <type root password>
29 If you want to do some more serious cross-platform programming with wxWindows,
30 such as for GTK and Motif, you can now build two complete libraries and use
31 them concurretly. For this end, you have to create a directory for each build
32 of wxWindows - you may also want to create different versions of wxWindows
33 and test them concurrently. Most typically, this would be a version configured
34 with --enable-debug_flag and one without. Note, that only one build can currently
35 be installed, so you'd have to use local version of the library for that purpose.
36 For building three versions (one GTK, one Motif and a debug version of the GTK
37 source) you'd do this:
41 ../configure --with-motif
47 ../configure --with-gtk
53 ../configure --with-gtk --enable-debug_flag
57 * The most simple errors
58 ------------------------
60 You get errors during compilation: The reason is that you probably have a broken
61 compiler, which includes almost everything that is called gcc. If you use gcc 2.8
62 you have to disable optimsation as the compiler will give up with an internal
65 If there is just any way for you to use egcs, use egcs. We cannot fix gcc.
67 You get immediate segfault when starting any sample or application: This is either
68 due to having compiled the library with different flags or options than your program -
69 typically you might have the __WXDEBUG__ option set for the library but not for your
70 program - or due to using a broken compiler (and its optimisation) such as GCC 2.8.
72 * The most simple program
73 -------------------------
75 Now create your super-application myfoo.app and compile anywhere with
77 g++ myfoo.cpp `wx-config --libs --cflags` -o myfoo
80 -----------------------
82 The Unix variants of wxWindows use GNU configure. If you have problems with your
83 make use GNU make instead.
85 If you have general problems with installation, read my homepage at
87 http://wesley.informatik.uni-freiburg.de/~wxxt
89 for newest information. If you still don't have any success, please send a bug
90 report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
91 YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF GTK, WXGTK, WHAT DISTRIBUTION
92 YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
95 -----------------------
97 wxWindows/Motif requires the Motif library to be installed on your system. As
98 an alternative, you may also use the free library "lesstif" which implements
99 most of the Motif API without the licence restrictions of Motif.
101 You can get the newest version of the Lesstif from the lesstif homepage at:
103 http://www.lesstif.org
105 * Additional libraries
106 -----------------------
108 wxWindows/Motif requires a thread library and X libraries known to work with threads.
109 This is the case on all commercial Unix-Variants and all Linux-Versions that are
110 based on glibc 2 except RedHat 5.0 which is broken in many aspects. As of writing
111 this, these Linux distributions have correct glibc 2 support:
119 You can disable thread support by running
121 ./configure "--disable-threads"
123 su <type root password>
128 NB: DO NOT COMPILE WXGTK WITH GCC AND THREADS, SINCE ALL PROGRAMS WILL CRASH UPON
129 START-UP! Just always use egcs and be happy.
131 * Building wxMotif on SGI
132 --------------------------
134 Using the SGI native compilers, it is recommended that you
135 also set CFLAGS and CXXFLAGS before running configure. These
139 CXXFLAGS="-mips3 -n32"
141 This is essential if you want to use the resultant binaries
142 on any other machine than the one it was compiled on. If you
143 have a 64bit machine (Octane) you should also do this to ensure
144 you don't accidently build the libraries as 64bit (which is
147 The SGI native compiler support has only been tested on Irix 6.5.
149 * Create your configuration
150 -----------------------------
155 If you want to use system's C and C++ compiler,
156 set environment variables CC and CCC as
160 % ./configure options
162 to see all the options please use:
166 The basic philosophy is that if you want to use different
167 configurations, like a debug and a release version,
168 or use the same source tree on different systems,
169 you have only to change the environment variable OSTYPE.
170 (Sadly this variable is not set by default on some systems
171 in some shells - on SGI's for example). So you will have to
172 set it there. This variable HAS to be set before starting
173 configure, so that it knows which system it tries to
176 Configure will complain if the system variable OSTYPE has
177 not been defined. And Make in some circumstances as well...
183 Given below are the commands to change the default behaviour,
184 i.e. if it says "--disable-threads" it means that threads
185 are enabled by default.
187 Many of the confiugre options have been thoroughly tested
188 in wxWindows snapshot 6, but not yet all (ODBC not).
190 You have to add --with-motif on platforms, where Motif is
191 not the default (on Linux, configure will deafult to GTK).
193 --without-gtk Don't use the GIMP ToolKit (GTK)
195 --with-motif Use either Motif or Lesstif
196 Configure will look for both.
198 The following options handle the kind of library you want to build.
200 --disable-threads Compile without thread support. Threads
201 support is also required for the
204 --disable-shared Do not create shared libraries.
206 --disable-optimise Do not optimise the code. Can
207 sometimes be useful for debugging
208 and is required on some architectures
209 such as Sun with gcc 2.8.X which
210 would otherwise produce segvs.
212 --enable-profile Add profiling info to the object
213 files. Currently broken, I think.
215 --enable-no_rtti Enable compilation without creation of
216 C++ RTTI information in object files.
217 This will speed-up compilation and reduce
220 --enable-no_exceptions Enable compilation without creation of
221 C++ exception information in object files.
222 This will speed-up compilation and reduce
223 binary size. Also fewer crashes during the
224 actual compilation...
226 --enable-mem_tracing Add built-in memory tracing.
228 --enable-dmalloc Use the dmalloc memory debugger.
229 Read more at www.letters.com/dmalloc/
231 --enable-debug_info Add debug info to object files and
232 executables for use with debuggers
233 such as gdb (or its many frontends).
235 --enable-debug_flag Define __DEBUG__ and __WXDEBUG__ when
236 compiling. This enable wxWindows' very
237 useful internal debugging tricks (such
238 as automatically reporting illegal calls)
239 to work. Note that program and library
240 must be compiled with the same debug
246 Many of the confiugre options have been thoroughly tested
247 in wxWindows snapshot 6, but not yet all (ODBC not).
249 When producing an executable that is linked statically with wxGTK
250 you'll be surprised at its immense size. This can sometimes be
251 drastically reduced by removing features from wxWindows that
252 are not used in your program. The most relevant such features
255 --without-libpng Disables PNG image format code.
257 --without-libjpeg Disables JPEG image format code.
259 { --without-odbc Disables ODBC code. Not yet. }
261 --disable-resources Disables the use of *.wxr type
264 --disable-threads Disables threads. Will also
267 --disable-sockets Disables sockets.
269 --disable-dnd Disables Drag'n'Drop.
271 --disable-clipboard Disables Clipboard.
273 --disable-serial Disables object instance serialiasation.
275 --disable-streams Disables the wxStream classes.
277 --disable-file Disables the wxFile class.
279 --disable-textfile Disables the wxTextFile class.
281 --disable-intl Disables the internationalisation.
283 --disable-validators Disables validators.
285 --disable-accel Disables accel.
287 Apart from disabling certain features you can very often "strip"
288 the program of its debugging information resulting in a significant
294 The following must be done in the base directory (e.g. ~/wxGTK
295 or ~/wxWin or whatever)
297 Now the makefiles are created (by configure) and you can compile
298 the library by typing:
302 make yourself some coffee, as it will take some time. On an old
303 386SX possibly two weeks. During compilation, you'll get a few
304 warning messages depending in your compiler.
306 If you want to be more selective, you can change into a specific
307 directiry and type "make" there.
309 Then you may install the library and it's header files under
310 /usr/local/include/wx and /usr/local/lib respectively. You
311 have to log in as root (i.e. run "su" and enter the root
316 You can remove any traces of wxWindows by typing
320 If you want to save disk space by removing unnecessary
325 in the various directories will do the work for you.
327 * Creating a new Project
328 --------------------------
330 1) The first way uses the installed libraries and header files
331 automatically using wx-config
333 g++ myfoo.cpp `wx-config --libs` `wx-config --cflags` -o myfoo
335 Using this way, a make file for the minimal sample would look
341 $(CC) -o minimal minimal.o `wx-config --libs`
343 minimal.o: minimal.cpp mondrian.xpm
344 $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
349 This is certain to become the standard way unless we decide
352 2) The other way creates a project within the source code
353 directories of wxWindows. For this endeavour, you'll need
354 the usual number of GNU tools, at least
356 GNU automake version 1.4
357 GNU autoheader version 2.14
358 GNU autoconf version 2.14
359 GNU libtool version 1.2 (1.3 seems broken)
366 and if you have all this then you probably know enough to
367 go ahead yourself :-)
369 ----------------------
371 In the hope that it will be useful,
373 Robert Roebling <roebling@sun2.ruf.uni-freiburg.de>