wxWindows 2.0 for Motif installation
------------------------------------
+IMPORTANT NOTE: If you experience problems installing, please re-read this
+ instructions and other related files (todo.txt, bugs.txt and
+ osname.txt for your platform if it exists) carefully before
+ mailing wxwin-users or the author. Preferably, try to fix the
+ problem first and then send a patch to the author.
+
- Prerequisites: Motif 1.2 or above, or Lesstif
(not yet tested). Motif 2.0 and above may also be suitable.
files to Unix format. Don't worry about files being
overwritten: they should be identical anyway.
+ (See http://www.cdrom.com/pub/infozip/ if you don't have zip/unzip
+ already installed. Zip isn't the same as gzip!)
+
+- It is recommended that you install bison and flex; using yacc
+ and lex may require tweaking of the makefiles. You also need
+ libXpm (see comments in the Notes section below) if you want to have
+ XPM support in wxWindows (recommended).
+
+- You now have the option of using the configure-based system, or the simple
+ makefile system.
+
+ Using configure is the recommended way to build the library. If it doesn't
+ work for you for whatever reason, please report it (together with detailed
+ information about your platform and the (relevant part of) contents of
+ config.log file) to wxwin-developers@wx.dent.med.uni-muenchen.de.
+
COMPILING USING CONFIGURE
+=========================
- You can use the wxGTK configure system to make wxMotif, or
you can follow the following steps to use the simpler (but
less automatic) makefile system. If using configure, the
following script should make the library and samples, when
- run from the top-level wxWindows directory (see also 'makewx'
- in this directory):
-
- # Make wxMotif using the configure system
- chmod a+x configure config.sub setup/general/* config.guess setup/shared/*
- ./configure --with-shared --with-motif --with-debug_flag \
- --with-debug_info --without-threads
+ run from the top-level wxWindows directory (see also 'makewxmotif'
+ in this directory). Make this script executable with the command
+ chmod a+x makewxmotif.
+
+ -------:x-----Cut here-----:x-----
+ # makewxmotif
+ # Sets permissions (in case we extracted wxMotif from zip files)
+ # and makes wxMotif.
+ # Call from top-level wxWindows directory.
+ # Note that this uses standard (but commonly-used) configure options;
+ # if you're feeling brave, you may wish to compile with threads:
+ # if they're not supported by the target platform, they will be disabled
+ # anyhow
+ # -- Julian Smart
+ chmod a+x configure config.sub config.guess setup/general/* setup/shared/*
+ ./configure --with-shared --with-motif --without-gtk --with-debug_flag --with-debug_info --without-threads
make
+ -------:x-----Cut here-----:x-----
+
+ This script will build wxMotif using shared libraries.
+
+- Change directory to a sample e.g. samples/minimal, and type make.
+ The binary will end up under the Linux (or other appropriate) subdirectory.
+
+- To build an application outside the wxWindows hierarchy, you can
+ use `wx-config --cflags` when compiling source files and `wx-config --libs`
+ when linking, where wx-config is in the wxWindows root directory.
+ These invocations return the appropriate flags for the compiler.
+
+- When compiling certain utilities such as Dialog Editor, you may find
+ that the makefile refers to wx-config as above. Unless you have used
+ "make install" to install wxWindows, wx-config won't be found, so
+ either edit the makefile to hard-wire the flags, or place wx-config
+ where it will be found by the makefile, or add the directory where you have
+ installed wxWindows to your PATH.
+
+- If switching between wxMotif and wxGTK, you should remove the
+ config.cache file manually before running configure again.
COMPILING USING MAKEFILES
+=========================
+
+- Copy the file include/wx/motif/setup0.h to include/wx/motif/setup.h and
+ edit it if you wish to enable/disable some library features
- Choose a .env file from src/makeenvs that matches your
environment, and copy it to src/make.env. These are the
export WXWIN=/home/jacs/wx2
- Later, there will be a better makefile system
- and/or alternate make.env files as per wxWindows 1.68.
Please feel free to contribute settings files for your environment.
- Change directory to src/motif and type:
make -f makefile.unx motif
This should make the library libwx_motif.a in the lib
- directory.
+ directory. Note that this makefile system does not build shared
+ libraries, only static ones (that is, the wxWindows library will be
+ linked statically; to see remaining dependencies on shared libraries,
+ type e.g. ldd minimal_motif).
- Make a sample, such as the minimal sample:
and run the resulting minimal_motif binary.
-Notes:
-------
+Troubleshooting
+---------------
+
+- If you have trouble compiling the file y_tab.c, or have strange
+ linking errors, check whether you're using a C or C++ compiler for this file.
+ You should specify a C compiler in the CCLEX variable in src/make.env.
+ You could also try using bison and flex instead of yacc and
+ lex.
+
+- Solaris compilation with gcc: if the compiler has problems with the variable argument
+ functions, try putting the gcc fixinclude file paths early in the include
+ path.
+
+- If you operator-related compile errors or strange memory problems
+ (for example in deletion of string arrays), set wxUSE_GLOBAL_MEMORY_OPERATORS
+ and wxUSE_MEMORY_TRACING to 0 in setup.h, and recompile.
+
+- If you get an internal compiler error in gcc, turn off optimisations.
+
+- Problems with XtDestroyWidget crashing in ~wxWindow have been
+ reported on SGI IRIX 6.4. This has not yet been resolved, so
+ any advice here would be very welcome. See bugs.txt for a
+ possible temporary workaround (comment out the final
+ XtDestroyWidget from ~wxWindow in window.cpp).
+
+- If you use flex and bison instead of yacc and lex, you may need
+ to change the relevant part of src/motif/makefile.unx to read:
+
+ ../common/y_tab.c: ../common/parser.y
+ $(YACC) ../common/parser.y
+ mv ../common/parser.tab.c ../common/y_tab.c
+
+ (the 'mv' command needs to be changed)
+
+- Some compilers, such as Sun C++, may give a lot of warnings about
+ virtual functions being hidden. Please ignore these, it's correct C++ syntax.
+ If you find any incorrect instances, though, such as a
+ missing 'const' in an overridden function, please let us know.
+
+Other Notes
+-----------
- Better installation and makefile systems are
- required. Although the wxGTK config system can be used to make
- wxMotif and samples, it can't easily be made to work
- with applications outside the wxWindows hierarchy. Hence the
- simple makefile system.
+ required. A revised configure system is in preparation.
-- Debugging mode is switched on by default. To compile in non-debug
- mode, remove the -D__WXDEBUG__ switch in make.env.
+- Debugging mode is switched on by default in the makefiles, but using
+ configure will create a release build of the library by default: it's
+ recommended to use --with-debug_info and --with-debug_flag configure
+ switches while developing your application. To compile in non-debug
+ mode, remove the -D__WXDEBUG__ switch in make.env (or if using the
+ configure system, change --with-debug_flag to --without_debug_flag
+ and --with-debug_info to --without-debug_info in the makewxmotif
+ script).
- Some classes can be switched off in include/wx/motif/setup.h,
if you are having trouble with a particular file. However,
- Thread support is switched off by default in setup.h (wxUSE_THREADS)
because standard Unices often do not have the necessary thread library
installed. Please see ../docs/gtk/install.txt for more details on this.
- For Linux, the problem is expected to go away with future
- distributions of the operating system.
-
-- If you have trouble compiling the file y_tab.c, or have strange
- linking errors, check whether you're using a C or C++ compiler for this file.
- You should specify a C compiler in the CCLEX variable in src/make.env.
+ The systems for which thread support is known to work are Linux with libc6
+ (a.k.a. glibc2), Solaris 2.5 and 2.6 (provided that X libraries are thread
+ safe) and, to some extent, FreeBSD 2.8 and 3.1 (any feedback on thread
+ support under FreeBSD as well as the systems not mentioned here would be
+ appreciated).
- If you run into problems with a missing X11/Xpm.h header, you
need to install the XPM package. It can be obtained from:
is installed and possibly change bitmap.cpp to
include <xpm.h> instead of <X11/xpm.h>
- Alternatively, edit include/motif/setup.h, set wxUSE_XPM
+ Alternatively, edit include/wx/motif/setup.h, set wxUSE_XPM
to 0, and recompile. You will not be able to load any XPMs,
though (currently the only supported colour bitmap format).
-- Please send bug reports with a description of your environment,
- compiler and the error message(s) to the wxwin-users mailing list at:
+Bug reports
+-----------
- wxwin-users@wx.dent.med.uni-muenchen.de
+Please send bug reports with a description of your environment,
+compiler and the error message(s) to the wxwin-developers mailing list at:
+ wxwin-developers@wx.dent.med.uni-muenchen.de
-Julian Smart, December 1998.
+Julian Smart, February 1999.
julian.smart@ukonline.co.uk