1 wxWindows 2.0 for Motif installation
2 ------------------------------------
4 IMPORTANT NOTE: If you experience problems installing, please
5 re-read this instructions and other related files (todo.txt,
6 bugs.txt etc.) carefully before mailing wxwin-users or
7 the author. Preferably, try to fix the problem first and
8 then send a patch to the author.
10 - Prerequisites: Motif 1.2 or above, or Lesstif
11 (not yet tested). Motif 2.0 and above may also be suitable.
13 - Download the files wx200gen.zip and wx200mot.zip, and
14 documentation in a preferred format, such as wx200htm.zip
17 - Make a directory such as ~/wx and unzip the files into this
18 directory. Use the -a option if available to convert the ASCII
19 files to Unix format. Don't worry about files being
20 overwritten: they should be identical anyway.
22 (See http://www.cdrom.com/pub/infozip/ if you don't have zip/unzip
23 already installed. Zip isn't the same as gzip!)
25 - It is recommended that you install bison and flex; using yacc
26 and lex may require tweaking of the makefiles. You also need
27 Xpm (see comments in the Notes section below).
29 - You now have the option of using the configure-based system,
30 or the simple makefile system. Configure is more hard to debug
31 if things go wrong, but may be easier to use if they go OK :-)
32 Makefiles are easier to tweak.
34 COMPILING USING CONFIGURE
35 =========================
37 - You can use the wxGTK configure system to make wxMotif, or
38 you can follow the following steps to use the simpler (but
39 less automatic) makefile system. If using configure, the
40 following script should make the library and samples, when
41 run from the top-level wxWindows directory (see also 'makewxmotif'
42 in this directory). Make this script executable with the command
43 chmod a+x makewxmotif.
45 -------:x-----Cut here-----:x-----
47 # Sets permissions (in case we extracted wxMotif from zip files)
49 # Call from top-level wxWindows directory.
50 # Note that this uses standard (but commonly-used) configure options;
51 # if you're feeling brave, you may wish to compile with threads.
53 chmod a+x configure config.sub config.guess setup/general/* setup/shared/*
54 ./configure --with-shared --with-motif --without-gtk --with-debug_flag --with-debug_info --without-threads
57 -------:x-----Cut here-----:x-----
59 This script will build wxMotif using shared libraries.
61 - Change directory to a sample e.g. samples/minimal, and type make.
62 The binary will end up under the Linux (or other appropriate) subdirectory.
64 - To build an application outside the wxWindows hierarchy, you can
65 use `wx-config --cflags` when compiling source files and `wx-config --libs`
66 when linking, where wx-config is in the wxWindows root directory.
67 These invocations return the appropriate flags for the compiler.
69 - When compiling certain utilities such as Dialog Editor, you may find
70 that the makefile refers to wx-config as above. Unless you have used
71 "make install" to install wxWindows, wx-config won't be found, so
72 either edit the makefile to hard-wire the flags, or place wx-config
73 where it will be found by the makefile.
75 - If switching between wxMotif and wxGTK, you should remove the
76 config.cache file manually before running configure again.
78 COMPILING USING MAKEFILES
79 =========================
81 - Choose a .env file from src/makeenvs that matches your
82 environment, and copy it to src/make.env. These are the
83 settings read by wxWindows for Motif makefiles.
85 - Edit src/make.env to change options according to your local
86 environment. In particular, change WXDIR to where wxWindows is
87 found on your system, or set the WXWIN environment variable
88 before compilation, e.g.:
90 export WXWIN=/home/jacs/wx2
92 Please feel free to contribute settings files for your environment.
94 - Change directory to src/motif and type:
96 make -f makefile.unx motif
98 This should make the library libwx_motif.a in the lib
99 directory. Note that this makefile system does not build shared
100 libraries, only static ones (that is, the wxWindows library will be
101 linked statically; to see remaining dependencies on shared libraries,
102 type e.g. ldd minimal_motif).
104 - Make a sample, such as the minimal sample:
107 make -f makefile.unx motif
109 and run the resulting minimal_motif binary.
114 - If you have trouble compiling the file y_tab.c, or have strange
115 linking errors, check whether you're using a C or C++ compiler for this file.
116 You should specify a C compiler in the CCLEX variable in src/make.env.
117 You could also try using bison and flex instead of yacc and
120 - Solaris compilation with gcc: if the compiler has problems with the variable argument
121 functions, try putting the gcc fixinclude file paths early in the
124 - If you operator-related compile errors or strange memory problems
125 (for example in deletion of string arrays), set wxUSE_GLOBAL_MEMORY_OPERATORS
126 and wxUSE_MEMORY_TRACING to 0 in setup.h, and recompile.
128 - If you get an internal compiler error in gcc, turn off
131 - Problems with XtDestroyWidget crashing in ~wxWindow have been
132 reported on SGI IRIX 6.4. This has not yet been resolved, so
133 any advice here would be very welcome. See bugs.txt for a
134 possible temporary workaround (comment out the final
135 XtDestroyWidget from ~wxWindow in window.cpp).
137 - If you use flex and bison instead of yacc and lex, you may need
138 to change the relevant part of src/motif/makefile.unx to read:
140 ../common/y_tab.c: ../common/parser.y
141 $(YACC) ../common/parser.y
142 mv ../common/parser.tab.c ../common/y_tab.c
144 (the 'mv' command needs to be changed)
146 - Some compilers, such as Sun C++, may give a lot of warnings about
147 virtual functions being hidden. Please ignore these, it's correct C++ syntax.
148 If you find any incorrect instances, though, such as a
149 missing 'const' in an overridden function, please let us know.
154 - Better installation and makefile systems are
155 required. A revised configure system is in preparation.
157 - Debugging mode is switched on by default. To compile in non-debug
158 mode, remove the -D__WXDEBUG__ switch in make.env (or if using the
159 configure system, change --with-debug_flag to --without_debug_flag
160 and --with-debug_info to --without-debug_info in the makewxmotif
163 - Some classes can be switched off in include/wx/motif/setup.h,
164 if you are having trouble with a particular file. However,
165 I'd prefer you to fix the problem and send the fix to me :-) or at
166 least let me know about it.
168 - Thread support is switched off by default in setup.h (wxUSE_THREADS)
169 because standard Unices often do not have the necessary thread library
170 installed. Please see ../docs/gtk/install.txt for more details on this.
171 For Linux, the problem is expected to go away with future
172 distributions of the operating system.
174 - If you run into problems with a missing X11/Xpm.h header, you
175 need to install the XPM package. It can be obtained from:
177 ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz
178 http://sunfreeware.com
180 You may need to modify make.env to add -I and -L options pointing to where Xpm
181 is installed and possibly change bitmap.cpp to
182 include <xpm.h> instead of <X11/xpm.h>
184 Alternatively, edit include/motif/setup.h, set wxUSE_XPM
185 to 0, and recompile. You will not be able to load any XPMs,
186 though (currently the only supported colour bitmap format).
191 Please send bug reports with a description of your environment,
192 compiler and the error message(s) to the wxwin-users mailing list at:
194 wxwin-users@wx.dent.med.uni-muenchen.de
196 Julian Smart, February 1999.
197 julian.smart@ukonline.co.uk