2 -----------------------
4 If you compile wxWindows on Unix for the first time and don't like
5 to read install instructions just do (in the base dir):
7 ./configure --with-gtk --with-shared --without-threads
14 -----------------------
16 The Unix variants of wxWindows use GNU configure. If you have problems
17 with your make use GNU make instead.
21 http://wesley.informatik.uni-freiburg.de/~wxxt
23 for newest information.
26 -----------------------
28 wxWindows requires a GUI toolkit to be installed. Does that make
29 sense? So far only the GTK is supported, but we hope to provide
30 the choice between GTK, Qt, Motif/Lesstif in the not so distant
33 You can get the newest version of the GTK from the GTK homepage
37 The newest versin of Qt can be downloaded for free from the Trolltec's
41 Lesstif can be downloaded from their site
43 http://www.lesstif.org
45 If you want to develop using Motif, you need to buy it, unless it comes
46 with your operating system such as all commercial Unices, as well as
47 RedHat's, SuSe's and probably other's Linux Motif editions.
49 * Additional libraries
50 -----------------------
52 There will be a few more features of wxWindows, which will
53 require further libraries (on some platforms). These
54 features will be optional. I hope to teach configure
55 to check that out automatically.
59 Requires pthreads under Linux with glibc 2. pthreads are
60 always present on such systems, so just compile, unless
61 you have RedHat 5.0, which has a broken combination of
62 glibc 2 and X. In this case, you have to run configure
63 with "--without-threads".
65 Requires PCthreads under Linux with libc 5. If you
66 haven't installed pcthreads, there will be no thread
67 support in wxWindows, but the library will compile.
69 Requires Posix threads on commercial Unix system,
70 which are always present. Just compile.
72 On SGI Irix we first look for sprocs, then pthreads and
73 use the last one found.
75 Python scripting language support:
77 Requires Python. Soon to come.
80 -----------------------------
82 wxGTK and wxMotif/wxLesstif require the built-in
83 ImLib/GdkImlib to be configured. For that purpose
84 copy the two files from /misc/imlib to your
85 home directory and rename "imrc" -> ".imrc".
86 You may also edit imrc by hand as you like.
87 The palette file is required when using
88 wxWindows in 256-colour mode.
90 If you want to use wxWindows's ODBC support, you'll have
91 to create a .odbc.ini file. The readme file in
92 ~/src/iodbc tells you what to do.
95 * Create your configuration
96 -----------------------------
101 If you want to use system's C and C++ compiler,
102 set environment variables CC and CCC as
106 % ./configure options
108 Using the SGI native compilers, it is recommended that you
109 also set CFLAGS and CXXFLAGS before running configure. These
113 CXXFLAGS="-mips3 -n32"
115 This is essential if you want to use the resultant binaries
116 on any other machine than the one it was compiled on. If you
117 have a 64bit machine (Octane) you should also do this to ensure
118 you don't accidently build the libraries as 64bit (which is
121 The SGI native compiler support has only been tested on Irix 6.5.
123 to see all the options please use:
127 The basic philosophy is that if you want to use different
128 configurations, like a debug and a release version,
129 or use the same source tree on different systems,
130 you have only to change the environment variable OSTYPE.
131 (Sadly this variable is not set by default on some systems
132 in some shells - on SGI's for example). So you will have to
133 set it there. This variable HAS to be set before starting
134 configure, so that it knows which system it tries to
137 Configure will complain if the system variable OSTYPE has
138 not been defined. And Make in some circumstances as well...
144 Obviously, you have to choose a toolkit. You must do this by
145 running configure with either of
147 --with-gtk Use the GIMP ToolKit (GTK)
149 --with-qt Use Qt from TrollTec
151 --with-motif Use either Motif or Lesstif
152 Configure will look for both.
154 The following options handle the kind of library you want to build.
156 --without-threads Compile without thread support.
158 --with-shared Create shared libraries.
160 --without-optimise Do not optimise the code.
162 --with-profile Add profiling info to the object
163 files. Currently broken, I think.
165 --with-mem_tracing Add built-in memory tracing.
166 This doesn't work well with gcc.
168 --with-dmalloc Use the dmalloc memory debugger.
169 Read more at www.letters.com/dmalloc/
171 --with-debug_info Add debug info to object files and
174 --with-debug_flag Define __DEBUG__ and __WXDEBUG__ when
180 When using the Windows version of wxWindows, it is possible
181 to edit the file /include/wx/msw/setup.h in order to enable
182 or disable some features of wxWindows so that the resulting
183 binaries get smaller.
185 As I don't yet care for binary size and target mainly at
186 producing a shared library, wxWindows's configure system auto-
187 matically enables all features, as long as they are already
193 The following must be done in the base directory (e.g. ~/wxGTK
196 First you have to create all makefiles in all subdirectories:
200 Dependencies are generated automatically using
204 (For some reason, this doesn't seem to work completely.)
206 Now the makefiles are created you can compile everything is as simple
211 make yourself some coffee, as it will try to compile
212 ALL the files in this distribution.
214 if you want to be more selective:
216 make src will build only the base libraries
217 make utils will build the utils
218 make samples will build the samples
219 make other will build the other samples
220 make user will build the files in the directory other
222 Depending on the configuration of some files, the libraries
223 and binaries will be placed in different directories.
224 The "global" binaries and libraries will be placed in:
227 lib/$(OSTYPE) respectively
229 "local" binaries and libraries will be placed in:
231 (basedir of that application)/$(OSTYPE).
233 This is also the place where all the object-files will go.
235 If you want to conserve disk space by removing unnecessary
240 will do the work for you.
242 * Creating a new Project
243 --------------------------
245 I propose to put all contributed programs in the directory
246 "~/wxWin/user", with a directory of its own.
248 This directory then should include the following files:
250 Makefile (You can copy this one from any application in samples
251 probably you will not need to edit this one. There is
252 only one case where you might be interested in changing
253 this file, but about that see later.)
254 Makefile.in (This is the base application-Makefile template, from
255 which the actual Makefile for each system is created.
256 More about this later)
258 put ALL your source code along with all the other stuff you need for
259 your application in this directory (subdirectories are welcome).
261 ** Something about Makefiles
262 ------------------------------
264 On general principle it should only contain ONE line, which is as follows:
266 include ../../setup/general/makeapp
268 this will include all the necessary definitions for creating the applications
270 the only case where you might want to add another line is the following:
271 this version of configure also supports creation of source archives of the
272 application for easy distribution and updates to newer version of wxWindows.
273 For this purpose all files in the application-directory will be put into
274 a gziped tar-file in the full notation user/<your application>/*
275 if you want to include some other files that you want "more visible", like
276 a README.<yourApp> or a shell script for easy
277 compilation/installation/distribution, then you have to add a variable
279 DISTRIBUTE_ADDITIONAL=<your files>
282 So it would look like this:
284 DISTRIBUTE_ADDITIONAL=README.TheApp
285 include ../../setup/general/makeapp
287 As we have already talked about distribution the command to create a
292 NOTE: If you are in the base directory of wxWindows it will create
293 distribution packages for wxWindows as well as for all packages in the
295 So if you want to create only packages for the files in user,
296 then go to the directory other and type:
300 or if you only want one application to be created then
301 enter the specific directory and type there:
304 All the distribution files will be put in the directory
305 distrib at the base of the wxWindows-tree (where also configure
306 and template.mak can be found).
308 ** Something about Makefile.in
309 --------------------------------
311 As you have already seen with Makefile, configure makes a lot of use
312 if the include statement in make to keep the Makefiles as simple as
315 So basically there are only variables to define and then a include command.
316 Exception to this rule is if you have special rules for some stuff...
317 These rules should go AFTER the include statement!!!
319 so the general header looks like this:
321 # wxWindows base directory
322 WXBASEDIR=@WXBASEDIR@
323 # set the OS type for compilation
325 # compile a library only
328 and the general footer will look like this:
330 # include the definitions now
331 include ../../../template.mak
333 the key variable is RULE, which defines what make should create
336 here are some examples:
339 ===========================================================================
340 bin creates a local binary (for a global binary prefix bin with g)
341 additional variables needed:
342 BIN_TARGET this gives the name of your application
343 BIN_OBJ this gives the object files needed to
345 optional variables are:
346 BIN_SRC this gives the list of c/c++ files for
347 which dependencies will be checked.
348 (This can be achieved with: make depend)
349 BIN_LINK this gives commands for additional
350 libraries needed to link the application
351 ---------------------------------------------------------------------------
352 bin2 creates two local binaries (for global binaries prefix bin2 with g)
353 in addition to the variables specified above you MUST also
354 provide the same variables with BIN2_ instead of BIN_
355 ---------------------------------------------------------------------------
356 lib creates a local library (for a global binary prefix bin with g)
357 additional variables needed:
358 LIB_TARGET this gives the name of your library
359 LIB_OBJ this gives the object files needed for
360 the library to be build.
361 optional variables are:
362 LIB_SRC this gives the list of c/c++ files for
363 which dependencies will be checked.
364 libbin and libgbin are also possible and will need in addition
365 the variables from bin
366 ---------------------------------------------------------------------------
367 gslib is similar to lib, but it creates a shared library if the system
369 additional variables needed:
370 LIB_MAJOR major number of the shared library
371 LIB_MINOR minor number of the shared library
372 ---------------------------------------------------------------------------
373 other additional variables:
375 ADD_COMPILE define additional includes/defines that
376 are needed to compile the object files
377 (if you need to reference some directory
378 utils - like wxGrid -, then please
379 reference them with the variables defined
380 in template.mak - e.g.: $(SRCDIR),$(UTILS),
381 $(SAMPLES),$(OTHERS))
383 NEEDED_DEFINES lists all the defines that HAVE to be set in
384 /include/wx/setup.h to compile correctly.
386 SRC_DIR lists all directories that are needed to
387 compile. (i.e: lists all the directories,
388 where there are source-files.) But it is
389 also needed to clean an object and for
390 machines, for which make does not support
393 currently there are the following compiling rules provided:
394 object files are created for the following file extensions:
397 Please have a closer look at the Makefiles in this distribution.
399 * Platforms configure is working with
400 ---------------------------------------
402 Please report build succes on any machine. Especially non-
403 Linux operating systems (which I don't have).
405 Original author of the autoconf system for wxxt-1.66 and for this INSTALL
408 Martin Sperl sperl@dsn.ast.univie.ac.at
412 Wolfram Gloger wmglo@dent.med.uni-muenchen.de
414 Thanks alot to both of them.
416 In the hope that it will be useful,
418 Robert Roebling roebling@sun2.ruf.uni-freiburg.de