]> git.saurik.com Git - wxWidgets.git/blob - docs/motif/install.txt
Corrected link error for missing wxRegTipProvider::GetTip by giving it
[wxWidgets.git] / docs / motif / install.txt
1 wxWindows 2.0 for Motif installation
2 ------------------------------------
3
4 IMPORTANT NOTE: If you experience problems installing, please re-read this
5 instructions and other related files (todo.txt, bugs.txt and
6 osname.txt for your platform if it exists) carefully before
7 mailing wxwin-users or the author. Preferably, try to fix the
8 problem first and then send a patch to the author.
9
10 - Prerequisites: Motif 1.2 or above, or Lesstif
11 (not yet tested). Motif 2.0 and above may also be suitable.
12
13 - Download the files wx200gen.zip and wx200mot.zip, and
14 documentation in a preferred format, such as wx200htm.zip
15 or wx200pdf.zip.
16
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.
21
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!)
24
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 libXpm (see comments in the Notes section below) if you want to have
28 XPM support in wxWindows (recommended).
29
30 - You now have the option of using the configure-based system, or the simple
31 makefile system.
32
33 Using configure is the recommended way to build the library. If it doesn't
34 work for you for whatever reason, please report it (together with detailed
35 information about your platform and the (relevant part of) contents of
36 config.log file) to wxwin-developers@wx.dent.med.uni-muenchen.de.
37
38 COMPILING USING CONFIGURE
39 =========================
40
41 - You can use the wxGTK configure system to make wxMotif, or
42 you can follow the following steps to use the simpler (but
43 less automatic) makefile system. If using configure, the
44 following script should make the library and samples, when
45 run from the top-level wxWindows directory (see also 'makewxmotif'
46 in this directory). Make this script executable with the command
47 chmod a+x makewxmotif.
48
49 -------:x-----Cut here-----:x-----
50 # makewxmotif
51 # Sets permissions (in case we extracted wxMotif from zip files)
52 # and makes wxMotif.
53 # Call from top-level wxWindows directory.
54 # Note that this uses standard (but commonly-used) configure options;
55 # if you're feeling brave, you may wish to compile with threads:
56 # if they're not supported by the target platform, they will be disabled
57 # anyhow
58 # -- Julian Smart
59 chmod a+x configure config.sub config.guess setup/general/* setup/shared/*
60 ./configure --with-shared --with-motif --without-gtk --with-debug_flag --with-debug_info --without-threads
61 make
62 -------:x-----Cut here-----:x-----
63
64 This script will build wxMotif using shared libraries.
65
66 - Change directory to a sample e.g. samples/minimal, and type make.
67 The binary will end up under the Linux (or other appropriate) subdirectory.
68
69 - To build an application outside the wxWindows hierarchy, you can
70 use `wx-config --cflags` when compiling source files and `wx-config --libs`
71 when linking, where wx-config is in the wxWindows root directory.
72 These invocations return the appropriate flags for the compiler.
73
74 - When compiling certain utilities such as Dialog Editor, you may find
75 that the makefile refers to wx-config as above. Unless you have used
76 "make install" to install wxWindows, wx-config won't be found, so
77 either edit the makefile to hard-wire the flags, or place wx-config
78 where it will be found by the makefile, or add the directory where you have
79 installed wxWindows to your PATH.
80
81 - If switching between wxMotif and wxGTK, you should remove the
82 config.cache file manually before running configure again.
83
84 COMPILING USING MAKEFILES
85 =========================
86
87 - Copy the file include/wx/motif/setup0.h to include/wx/motif/setup.h and
88 edit it if you wish to enable/disable some library features
89
90 - Choose a .env file from src/makeenvs that matches your
91 environment, and copy it to src/make.env. These are the
92 settings read by wxWindows for Motif makefiles.
93
94 - Edit src/make.env to change options according to your local
95 environment. In particular, change WXDIR to where wxWindows is
96 found on your system, or set the WXWIN environment variable
97 before compilation, e.g.:
98
99 export WXWIN=/home/jacs/wx2
100
101 Please feel free to contribute settings files for your environment.
102
103 - Change directory to src/motif and type:
104
105 make -f makefile.unx motif
106
107 This should make the library libwx_motif.a in the lib
108 directory. Note that this makefile system does not build shared
109 libraries, only static ones (that is, the wxWindows library will be
110 linked statically; to see remaining dependencies on shared libraries,
111 type e.g. ldd minimal_motif).
112
113 - Make a sample, such as the minimal sample:
114
115 cd samples/minimal
116 make -f makefile.unx motif
117
118 and run the resulting minimal_motif binary.
119
120 Troubleshooting
121 ---------------
122
123 - If you have trouble compiling the file y_tab.c, or have strange
124 linking errors, check whether you're using a C or C++ compiler for this file.
125 You should specify a C compiler in the CCLEX variable in src/make.env.
126 You could also try using bison and flex instead of yacc and
127 lex.
128
129 - Solaris compilation with gcc: if the compiler has problems with the variable argument
130 functions, try putting the gcc fixinclude file paths early in the include
131 path.
132
133 - If you operator-related compile errors or strange memory problems
134 (for example in deletion of string arrays), set wxUSE_GLOBAL_MEMORY_OPERATORS
135 and wxUSE_MEMORY_TRACING to 0 in setup.h, and recompile.
136
137 - If you get an internal compiler error in gcc, turn off optimisations.
138
139 - Problems with XtDestroyWidget crashing in ~wxWindow have been
140 reported on SGI IRIX 6.4. This has not yet been resolved, so
141 any advice here would be very welcome. See bugs.txt for a
142 possible temporary workaround (comment out the final
143 XtDestroyWidget from ~wxWindow in window.cpp).
144
145 - If you use flex and bison instead of yacc and lex, you may need
146 to change the relevant part of src/motif/makefile.unx to read:
147
148 ../common/y_tab.c: ../common/parser.y
149 $(YACC) ../common/parser.y
150 mv ../common/parser.tab.c ../common/y_tab.c
151
152 (the 'mv' command needs to be changed)
153
154 - Some compilers, such as Sun C++, may give a lot of warnings about
155 virtual functions being hidden. Please ignore these, it's correct C++ syntax.
156 If you find any incorrect instances, though, such as a
157 missing 'const' in an overridden function, please let us know.
158
159 Other Notes
160 -----------
161
162 - Better installation and makefile systems are
163 required. A revised configure system is in preparation.
164
165 - Debugging mode is switched on by default in the makefiles, but using
166 configure will create a release build of the library by default: it's
167 recommended to use --with-debug_info and --with-debug_flag configure
168 switches while developing your application. To compile in non-debug
169 mode, remove the -D__WXDEBUG__ switch in make.env (or if using the
170 configure system, change --with-debug_flag to --without_debug_flag
171 and --with-debug_info to --without-debug_info in the makewxmotif
172 script).
173
174 - Some classes can be switched off in include/wx/motif/setup.h,
175 if you are having trouble with a particular file. However,
176 I'd prefer you to fix the problem and send the fix to me :-) or at
177 least let me know about it.
178
179 - Thread support is switched off by default in setup.h (wxUSE_THREADS)
180 because standard Unices often do not have the necessary thread library
181 installed. Please see ../docs/gtk/install.txt for more details on this.
182 The systems for which thread support is known to work are Linux with libc6
183 (a.k.a. glibc2), Solaris 2.5 and 2.6 (provided that X libraries are thread
184 safe) and, to some extent, FreeBSD 2.8 and 3.1 (any feedback on thread
185 support under FreeBSD as well as the systems not mentioned here would be
186 appreciated).
187
188 - If you run into problems with a missing X11/Xpm.h header, you
189 need to install the XPM package. It can be obtained from:
190
191 ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz
192 http://sunfreeware.com
193
194 You may need to modify make.env to add -I and -L options pointing to where Xpm
195 is installed and possibly change bitmap.cpp to
196 include <xpm.h> instead of <X11/xpm.h>
197
198 Alternatively, edit include/motif/setup.h, set wxUSE_XPM
199 to 0, and recompile. You will not be able to load any XPMs,
200 though (currently the only supported colour bitmap format).
201
202 Bug reports
203 -----------
204
205 Please send bug reports with a description of your environment,
206 compiler and the error message(s) to the wxwin-developers mailing list at:
207
208 wxwin-developers@wx.dent.med.uni-muenchen.de
209
210 Julian Smart, February 1999.
211 julian.smart@ukonline.co.uk