1998-11-04 22:17:19 +00:00
|
|
|
wxWindows 2.0 for Motif installation
|
|
|
|
------------------------------------
|
|
|
|
|
1999-03-30 09:47:59 +00:00
|
|
|
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.
|
1999-02-09 16:00:23 +00:00
|
|
|
|
1998-12-12 10:01:41 +00:00
|
|
|
- Prerequisites: Motif 1.2 or above, or Lesstif
|
|
|
|
(not yet tested). Motif 2.0 and above may also be suitable.
|
1998-11-04 22:17:19 +00:00
|
|
|
|
|
|
|
- Download the files wx200gen.zip and wx200mot.zip, and
|
|
|
|
documentation in a preferred format, such as wx200htm.zip
|
|
|
|
or wx200pdf.zip.
|
|
|
|
|
|
|
|
- Make a directory such as ~/wx and unzip the files into this
|
|
|
|
directory. Use the -a option if available to convert the ASCII
|
|
|
|
files to Unix format. Don't worry about files being
|
|
|
|
overwritten: they should be identical anyway.
|
|
|
|
|
1999-02-06 00:46:25 +00:00
|
|
|
(See http://www.cdrom.com/pub/infozip/ if you don't have zip/unzip
|
|
|
|
already installed. Zip isn't the same as gzip!)
|
|
|
|
|
1999-02-04 11:14:41 +00:00
|
|
|
- It is recommended that you install bison and flex; using yacc
|
|
|
|
and lex may require tweaking of the makefiles. You also need
|
1999-03-30 09:47:59 +00:00
|
|
|
libXpm (see comments in the Notes section below) if you want to have
|
|
|
|
XPM support in wxWindows (recommended).
|
1999-02-04 11:14:41 +00:00
|
|
|
|
1999-03-30 09:47:59 +00:00
|
|
|
- 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.
|
1999-02-04 11:14:41 +00:00
|
|
|
|
1998-12-12 10:01:41 +00:00
|
|
|
COMPILING USING CONFIGURE
|
1999-02-04 11:14:41 +00:00
|
|
|
=========================
|
1998-12-12 10:01:41 +00:00
|
|
|
|
|
|
|
- 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
|
1999-01-31 18:47:10 +00:00
|
|
|
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;
|
1999-03-30 09:47:59 +00:00
|
|
|
# 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
|
1999-01-31 18:47:10 +00:00
|
|
|
# -- 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
|
1998-12-12 10:01:41 +00:00
|
|
|
make
|
1999-01-31 18:47:10 +00:00
|
|
|
-------: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
|
1999-03-30 09:47:59 +00:00
|
|
|
where it will be found by the makefile, or add the directory where you have
|
|
|
|
installed wxWindows to your PATH.
|
1998-12-12 10:01:41 +00:00
|
|
|
|
1999-03-06 11:51:06 +00:00
|
|
|
- If switching between wxMotif and wxGTK, you should remove the
|
|
|
|
config.cache file manually before running configure again.
|
|
|
|
|
1998-12-12 10:01:41 +00:00
|
|
|
COMPILING USING MAKEFILES
|
1999-02-04 11:14:41 +00:00
|
|
|
=========================
|
1998-12-12 10:01:41 +00:00
|
|
|
|
1999-03-30 09:47:59 +00:00
|
|
|
- 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
|
|
|
|
|
1998-12-12 10:01:41 +00:00
|
|
|
- Choose a .env file from src/makeenvs that matches your
|
|
|
|
environment, and copy it to src/make.env. These are the
|
|
|
|
settings read by wxWindows for Motif makefiles.
|
|
|
|
|
1998-11-04 22:17:19 +00:00
|
|
|
- Edit src/make.env to change options according to your local
|
1998-11-09 11:57:05 +00:00
|
|
|
environment. In particular, change WXDIR to where wxWindows is
|
1998-12-11 16:09:06 +00:00
|
|
|
found on your system, or set the WXWIN environment variable
|
|
|
|
before compilation, e.g.:
|
|
|
|
|
|
|
|
export WXWIN=/home/jacs/wx2
|
|
|
|
|
1998-11-04 22:17:19 +00:00
|
|
|
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
|
1999-01-31 18:47:10 +00:00
|
|
|
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).
|
1998-11-04 22:17:19 +00:00
|
|
|
|
|
|
|
- Make a sample, such as the minimal sample:
|
|
|
|
|
|
|
|
cd samples/minimal
|
|
|
|
make -f makefile.unx motif
|
|
|
|
|
|
|
|
and run the resulting minimal_motif binary.
|
|
|
|
|
1999-02-10 22:44:53 +00:00
|
|
|
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
|
1999-03-30 09:47:59 +00:00
|
|
|
functions, try putting the gcc fixinclude file paths early in the include
|
|
|
|
path.
|
1999-02-10 22:44:53 +00:00
|
|
|
|
1999-02-18 21:24:11 +00:00
|
|
|
- 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.
|
1999-02-12 08:22:29 +00:00
|
|
|
|
1999-03-30 09:47:59 +00:00
|
|
|
- If you get an internal compiler error in gcc, turn off optimisations.
|
1999-02-17 17:18:22 +00:00
|
|
|
|
1999-02-12 08:22:29 +00:00
|
|
|
- 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
|
1999-02-18 21:24:11 +00:00
|
|
|
possible temporary workaround (comment out the final
|
|
|
|
XtDestroyWidget from ~wxWindow in window.cpp).
|
1999-02-12 08:22:29 +00:00
|
|
|
|
1999-02-24 08:02:28 +00:00
|
|
|
- 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.
|
|
|
|
|
1999-02-10 22:44:53 +00:00
|
|
|
Other Notes
|
|
|
|
-----------
|
1998-11-04 22:17:19 +00:00
|
|
|
|
|
|
|
- Better installation and makefile systems are
|
1999-01-31 18:47:10 +00:00
|
|
|
required. A revised configure system is in preparation.
|
1998-11-04 22:17:19 +00:00
|
|
|
|
1999-03-30 09:47:59 +00:00
|
|
|
- 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
|
1999-01-31 18:47:10 +00:00
|
|
|
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).
|
1998-11-09 11:57:05 +00:00
|
|
|
|
1998-11-04 22:17:19 +00:00
|
|
|
- Some classes can be switched off in include/wx/motif/setup.h,
|
|
|
|
if you are having trouble with a particular file. However,
|
|
|
|
I'd prefer you to fix the problem and send the fix to me :-) or at
|
|
|
|
least let me know about it.
|
1999-01-01 19:13:35 +00:00
|
|
|
|
|
|
|
- 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.
|
1999-03-30 09:47:59 +00:00
|
|
|
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).
|
1998-11-04 22:17:19 +00:00
|
|
|
|
1998-11-17 23:03:15 +00:00
|
|
|
- If you run into problems with a missing X11/Xpm.h header, you
|
|
|
|
need to install the XPM package. It can be obtained from:
|
|
|
|
|
|
|
|
ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz
|
1998-12-12 10:01:41 +00:00
|
|
|
http://sunfreeware.com
|
|
|
|
|
|
|
|
You may need to modify make.env to add -I and -L options pointing to where Xpm
|
|
|
|
is installed and possibly change bitmap.cpp to
|
|
|
|
include <xpm.h> instead of <X11/xpm.h>
|
1998-11-17 23:03:15 +00:00
|
|
|
|
|
|
|
Alternatively, edit include/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).
|
|
|
|
|
1999-02-10 22:44:53 +00:00
|
|
|
Bug reports
|
|
|
|
-----------
|
|
|
|
|
|
|
|
Please send bug reports with a description of your environment,
|
1999-03-30 09:47:59 +00:00
|
|
|
compiler and the error message(s) to the wxwin-developers mailing list at:
|
1998-11-04 22:17:19 +00:00
|
|
|
|
1999-03-30 09:47:59 +00:00
|
|
|
wxwin-developers@wx.dent.med.uni-muenchen.de
|
1998-11-04 22:17:19 +00:00
|
|
|
|
1999-02-12 08:22:29 +00:00
|
|
|
Julian Smart, February 1999.
|
1998-11-09 11:57:05 +00:00
|
|
|
julian.smart@ukonline.co.uk
|