3 -----------------------
 
   5 If you compile wxWidgets on Linux for the first time and don't like to read 
 
   6 install instructions just do (in the base dir):
 
   8 > ./configure --with-wine
 
  10 > su <type root password>
 
  15 On all variants of Unix except Linux (and maybe except *BSD), shared libraries 
 
  16 are not supported out of the box due to the utter stupidity of libtool, so you'll 
 
  17 have to do this to get shared library support:
 
  19 > ./configure --with-wine --disable-unicode --disable-static --enable-shared
 
  21 Then you'll have to edit the wrongly created libtool script. There are two
 
  22 important entries with respect to shared library creation, which are
 
  24   archive_cmds="\$LD -shared ....
 
  25   archive_expsym_cmds="\$LD -shared ....
 
  27 which should be something like
 
  29   archive_cmds="\$CC -shared ....
 
  30   archive_expsym_cmds="\$CC -shared ....
 
  32 Afterwards you can continue with
 
  35 > su <type root password>
 
  40 If you want to remove wxWidgets on Unix you can do this:
 
  42 > su <type root password>
 
  50 If you want to do some more serious cross-platform programming with wxWidgets, 
 
  51 such as for GTK and Motif, you can now build two complete libraries and use 
 
  52 them concurrently. For this end, you have to create a directory for each build 
 
  53 of wxWidgets - you may also want to create different versions of wxWidgets
 
  54 and test them concurrently. Most typically, this would be a version configured 
 
  55 with --enable-debug_flag and one without. Note, that only one build can currently 
 
  56 be installed, so you'd have to use local version of the library for that purpose.
 
  57 For building three versions (one GTK, one WINE and a debug version of the WINE 
 
  58 source) you'd do this:
 
  62 ../configure --with-motif
 
  68 ../configure --with-wine
 
  74 ../configure --with-wine --enable-debug_flag
 
  78 * The most simple errors
 
  79 ------------------------
 
  81 wxWINE doesn't work yet as WINE isn't really up to the task yet. 
 
  83 You get errors during compilation: The reason is that you probably have a broken 
 
  84 compiler, which includes almost everything that is called gcc. If you use gcc 2.8 
 
  85 you have to disable optimisation as the compiler will give up with an internal 
 
  88 If there is just any way for you to use egcs, use egcs. We cannot fix gcc.
 
  90 You get immediate segfault when starting any sample or application: This is either 
 
  91 due to having compiled the library with different flags or options than your program - 
 
  92 typically you might have the __WXDEBUG__ option set for the library but not for your 
 
  93 program - or due to using a broken compiler (and its optimisation) such as GCC 2.8.
 
  95 * The most simple program
 
  96 -------------------------
 
  98 Now create your super-application myfoo.app and compile anywhere with
 
 100 g++ myfoo.cpp `wx-config --libs --cflags` -o myfoo
 
 103 -----------------------
 
 105 The Unix variants of wxWidgets use GNU configure. If you have problems with your 
 
 106 make use GNU make instead.
 
 108 If you have general problems with installation, read my homepage at 
 
 110   http://wesley.informatik.uni-freiburg.de/~wxxt
 
 112 for newest information. If you still don't have any success, please send a bug 
 
 113 report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF 
 
 114 YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF WINE, WXWINE, WHAT DISTRIBUTION 
 
 115 YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
 
 118 -----------------------
 
 120 wxWidgets/WINE requires the WINE library to be installed on your system. 
 
 122 You can get the newest version of the WINE from the WINE homepage at:
 
 124   http://www.winehq.com
 
 126 * Create your configuration
 
 127 -----------------------------
 
 132 If you want to use system's C and C++ compiler,
 
 133 set environment variables CC and CCC as
 
 137     % ./configure options
 
 139 to see all the options please use:
 
 143 The basic philosophy is that if you want to use different
 
 144 configurations, like a debug and a release version, 
 
 145 or use the same source tree on different systems,
 
 146 you have only to change the environment variable OSTYPE.
 
 147 (Sadly this variable is not set by default on some systems
 
 148 in some shells - on SGI's for example). So you will have to 
 
 149 set it there. This variable HAS to be set before starting 
 
 150 configure, so that it knows which system it tries to 
 
 153 Configure will complain if the system variable OSTYPE has 
 
 154 not been defined. And Make in some circumstances as well...
 
 160 Given below are the commands to change the default behaviour,
 
 161 i.e. if it says "--disable-threads" it means that threads
 
 162 are enabled by default.
 
 164 Many of the configure options have been thoroughly tested
 
 165 in wxWidgets snapshot 6, but not yet all (ODBC not).
 
 167 You must do this by running configure with either of:
 
 169     --with-wine              Use the WINE library
 
 171 The following options handle the kind of library you want to build.
 
 173     --enable-threads        Compile with thread support. Threads
 
 174                             support is also required for the
 
 177     --disable-shared        Do not create shared libraries.
 
 179     --disable-optimise        Do not optimise the code. Can
 
 180                             sometimes be useful for debugging
 
 181                             and is required on some architectures
 
 182                             such as Sun with gcc 2.8.X which
 
 183                             would otherwise produce segvs.
 
 185     --enable-profile        Add profiling info to the object 
 
 186                             files. Currently broken, I think.
 
 188     --enable-no_rtti        Enable compilation without creation of
 
 189                             C++ RTTI information in object files. 
 
 190                             This will speed-up compilation and reduce 
 
 193     --enable-no_exceptions  Enable compilation without creation of
 
 194                             C++ exception information in object files. 
 
 195                             This will speed-up compilation and reduce 
 
 196                             binary size. Also fewer crashes during the
 
 197                             actual compilation...
 
 199     --enable-mem_tracing    Add built-in memory tracing. 
 
 201     --enable-dmalloc        Use the dmalloc memory debugger.
 
 202                             Read more at www.letters.com/dmalloc/
 
 204     --enable-debug_info     Add debug info to object files and
 
 205                             executables for use with debuggers
 
 206                             such as gdb (or its many frontends).
 
 208     --enable-debug_flag     Define __DEBUG__ and __WXDEBUG__ when
 
 209                             compiling. This enable wxWidgets' very
 
 210                             useful internal debugging tricks (such
 
 211                             as automatically reporting illegal calls)
 
 212                             to work. Note that program and library
 
 213                             must be compiled with the same debug 
 
 219 Many of the configure options have been thoroughly tested
 
 220 in wxWidgets snapshot 6, but not yet all (ODBC not).
 
 222 When producing an executable that is linked statically with wxGTK
 
 223 you'll be surprised at its immense size. This can sometimes be
 
 224 drastically reduced by removing features from wxWidgets that 
 
 225 are not used in your program. The most relevant such features
 
 228     --without-libpng    Disables PNG image format code.
 
 230     --without-libjpeg    Disables JPEG image format code.
 
 232 {   --without-odbc          Disables ODBC code. Not yet. }
 
 234     --disable-resources     Disables the use of *.wxr type
 
 237     --disable-threads       Disables threads. Will also
 
 240     --disable-sockets       Disables sockets.
 
 242     --disable-dnd           Disables Drag'n'Drop.
 
 244     --disable-clipboard     Disables Clipboard.
 
 246     --disable-serial        Disables object instance serialisation.
 
 248     --disable-streams       Disables the wxStream classes.
 
 250     --disable-file          Disables the wxFile class.
 
 252     --disable-textfile      Disables the wxTextFile class.
 
 254     --disable-intl          Disables the internationalisation.
 
 256     --disable-validators    Disables validators.
 
 258     --disable-accel         Disables accel.
 
 260 Apart from disabling certain features you can very often "strip"
 
 261 the program of its debugging information resulting in a significant
 
 267 The following must be done in the base directory (e.g. ~/wxGTK
 
 268 or ~/wxWin or whatever)
 
 270 Now the makefiles are created (by configure) and you can compile 
 
 271 the library by typing:
 
 275 make yourself some coffee, as it will take some time. On an old
 
 276 386SX possibly two weeks. During compilation, you'll get a few 
 
 277 warning messages depending in your compiler.
 
 279 If you want to be more selective, you can change into a specific
 
 280 directory and type "make" there.
 
 282 Then you may install the library and its header files under
 
 283 /usr/local/include/wx and /usr/local/lib respectively. You
 
 284 have to log in as root (i.e. run "su" and enter the root
 
 289 You can remove any traces of wxWidgets by typing
 
 293 If you want to save disk space by removing unnecessary
 
 298 in the various directories will do the work for you.
 
 300 * Creating a new Project
 
 301 --------------------------
 
 303 1) The first way uses the installed libraries and header files
 
 304 automatically using wx-config
 
 306 g++ myfoo.cpp `wx-config --libs` `wx-config --cflags` -o myfoo
 
 308 Using this way, a make file for the minimal sample would look
 
 314     $(CC) -o minimal minimal.o `wx-config --libs` 
 
 316 minimal.o: minimal.cpp mondrian.xpm
 
 317     $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
 
 322 This is certain to become the standard way unless we decide
 
 325 2) The other way creates a project within the source code 
 
 326 directories of wxWidgets. For this endeavour, you'll need
 
 327 the usual number of GNU tools, at least
 
 329 GNU automake version 1.4
 
 330 GNU autoheader version 2.14
 
 331 GNU autoconf version 2.14
 
 332 GNU libtool version 1.3
 
 339 and if you have all this then you probably know enough to
 
 340 go ahead yourself :-)
 
 342 ----------------------
 
 344 In the hope that it will be useful,
 
 346         Robert Roebling <roebling@sun2.ruf.uni-freiburg.de>
 
 349 Addition notes by Julian Smart, August 2002
 
 350 ===========================================    
 
 352 I've fixed some compile errors, and got as far as
 
 353 compiling wxWINE, but actually linking a sample will take
 
 356 To compile wxWINE, export these variables:
 
 358 export CPPFLAGS=-I/usr/local/include/wine
 
 359 export LDFLAGS=-L/usr/local/lib/wine
 
 363 configure --disable-static --enable-shared --enable-gui \
 
 364  --with-wine --without-libpng --enable-debug_flag --enable-log \
 
 365  --enable-debug_info --enable-ole --enable-clipboard --enable-dataobj \
 
 366  --enable-debug --enable-threads --disable-sockets \
 
 367  --with-libjpeg --enable-debug_cntxt
 
 369 Compiling a sample won't work yet because 'winebuild' needs
 
 370 to be called, and the resuling C file compiled and linked.
 
 371 Plus, Windows DLLs need to be imported.
 
 373 Note that the documentation on the WINE web site on using
 
 374 winebuild is out of date (August 2002) -- the spec file no
 
 375 longer supports import and type keywords. Instead look at
 
 376 samples in the WINE 'programs' directory for inspiration
 
 377 and compile options to use. It's probable that the
 
 378 wxWINE library will need recompiling with different options.
 
 380 Any progress on this front will be very welcome.
 
 382 Note that while wxWINE builds with --enable-unicode, samples
 
 383 don't run. Some samples will run when built with
 
 384 --disable-unicode, and others (such as auidemo) fail.