1998-11-04 17:17:19 -05:00
|
|
|
wxWindows 2.0 for Motif installation
|
|
|
|
------------------------------------
|
|
|
|
|
1998-12-12 05:01:41 -05:00
|
|
|
- Prerequisites: Motif 1.2 or above, or Lesstif
|
|
|
|
(not yet tested). Motif 2.0 and above may also be suitable.
|
1998-11-04 17:17:19 -05: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-04 06:14:41 -05:00
|
|
|
- It is recommended that you install bison and flex; using yacc
|
|
|
|
and lex may require tweaking of the makefiles. You also need
|
|
|
|
Xpm (see comments in the Notes section below).
|
|
|
|
|
|
|
|
- You now have the option of using the configure-based system,
|
|
|
|
or the simple makefile system. Configure is more hard to debug
|
|
|
|
if things go wrong, but may be easier to use if they go OK :-)
|
|
|
|
Makefiles are easier to tweak.
|
|
|
|
|
1998-12-12 05:01:41 -05:00
|
|
|
COMPILING USING CONFIGURE
|
1999-02-04 06:14:41 -05:00
|
|
|
=========================
|
1998-12-12 05:01:41 -05: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 13:47:10 -05: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;
|
|
|
|
# if you're feeling brave, you may wish to compile with threads.
|
|
|
|
# -- 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 makefiles
|
1998-12-12 05:01:41 -05:00
|
|
|
make
|
1999-01-31 13:47:10 -05: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
|
|
|
|
where it will be found by the makefile.
|
1998-12-12 05:01:41 -05:00
|
|
|
|
|
|
|
COMPILING USING MAKEFILES
|
1999-02-04 06:14:41 -05:00
|
|
|
=========================
|
1998-12-12 05:01:41 -05: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 17:17:19 -05:00
|
|
|
- Edit src/make.env to change options according to your local
|
1998-11-09 06:57:05 -05:00
|
|
|
environment. In particular, change WXDIR to where wxWindows is
|
1998-12-11 11:09:06 -05:00
|
|
|
found on your system, or set the WXWIN environment variable
|
|
|
|
before compilation, e.g.:
|
|
|
|
|
|
|
|
export WXWIN=/home/jacs/wx2
|
|
|
|
|
1998-11-04 17:17:19 -05: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 13:47:10 -05: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 17:17:19 -05:00
|
|
|
|
|
|
|
- Make a sample, such as the minimal sample:
|
|
|
|
|
|
|
|
cd samples/minimal
|
|
|
|
make -f makefile.unx motif
|
|
|
|
|
|
|
|
and run the resulting minimal_motif binary.
|
|
|
|
|
|
|
|
Notes:
|
|
|
|
------
|
|
|
|
|
|
|
|
- Better installation and makefile systems are
|
1999-01-31 13:47:10 -05:00
|
|
|
required. A revised configure system is in preparation.
|
1998-11-04 17:17:19 -05:00
|
|
|
|
1998-11-09 06:57:05 -05:00
|
|
|
- Debugging mode is switched on by default. To compile in non-debug
|
1999-01-31 13:47:10 -05: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 06:57:05 -05:00
|
|
|
|
1998-11-04 17:17:19 -05: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 14:13:35 -05: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.
|
|
|
|
For Linux, the problem is expected to go away with future
|
|
|
|
distributions of the operating system.
|
1998-11-04 17:17:19 -05:00
|
|
|
|
1998-12-15 12:47:11 -05:00
|
|
|
- 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.
|
|
|
|
|
1998-11-17 18:03:15 -05: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 05:01:41 -05: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 18:03:15 -05: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).
|
|
|
|
|
1998-11-04 17:17:19 -05:00
|
|
|
- Please send bug reports with a description of your environment,
|
1998-11-09 06:57:05 -05:00
|
|
|
compiler and the error message(s) to the wxwin-users mailing list at:
|
1998-11-04 17:17:19 -05:00
|
|
|
|
1998-11-09 06:57:05 -05:00
|
|
|
wxwin-users@wx.dent.med.uni-muenchen.de
|
1998-11-04 17:17:19 -05:00
|
|
|
|
|
|
|
|
1999-01-31 13:47:10 -05:00
|
|
|
Julian Smart, January 1999.
|
1998-11-09 06:57:05 -05:00
|
|
|
julian.smart@ukonline.co.uk
|