]> git.saurik.com Git - wxWidgets.git/blob - docs/mgl/install.txt
Applied patch [ 549256 ] fix minor bug in widgets sample
[wxWidgets.git] / docs / mgl / install.txt
1 wxWindows 2.3 for MGL installation
2 ------------------------------------
3
4 IMPORTANT NOTE:
5
6 If you experience problems installing, please re-read these
7 instructions and other related files (todo.txt, bugs.txt and
8 osname.txt for your platform if it exists) carefully before
9 mailing wxwin-users or the author. Preferably, try to fix the
10 problem first and then send a patch to the author.
11
12 When sending bug reports tell us what version of wxWindows you are
13 using (including the beta) and what compiler on what system. One
14 example: wxMGL 2.3.3, gcc 2.95.3, Redhat 7.0
15
16 First steps
17 -----------
18
19 - Download SciTech MGL library (version 5.0) from http://www.scitechsoft.com.
20 The downloads page is here:
21 http://www.scitechsoft.com/products/embedded/mgl_home.html
22 (You needed a version newer than Beta 5! Preferably the up-to-date one from
23 SciTech Perforce repository.)
24 Install it according to provided instructions. In particular, make sure that
25 MGL_ROOT and NUCLEUS_PATH environment variables are set before attempting to
26 build wxMGL.
27
28 - Download wxMGL-x.y.z.tgz, where x.y.z is the version number.
29 Download documentation in a preferred format, such as
30 wxWindows-HTML.zip or wxWindows-PDF.zip.
31
32 - Make a directory such as ~/wx and unarchive the files into this
33 directory.
34
35 - It is recommended that you install bison and flex; using yacc
36 and lex may require tweaking of the makefiles.
37
38 - You can now use configure or makefiles to build wxWindows and the samples.
39 In case of problems, please use GNU make.
40
41
42 COMPILING
43 =========
44
45 Following systems are supported by wxMGL so far:
46 - Unix (Linux etc.)
47 - MS-DOS (DJGPP and Watcom compilers)
48
49
50 * Compiling using configure
51 ----------------------------
52
53 These instructions apply to installation on a Unix system (such as Linux). Please
54 see bellow for information on using configure on non-Unix platforms.
55
56 If you compile wxWindows on Linux for the first time and don't like to read
57 install instructions just do (in the base dir):
58
59 > ./configure --with-mgl
60 > make
61 > su <type root password>
62 > make install
63 > ldconfig
64 > exit
65
66 Afterwards you can continue with
67
68 > make
69 > su <type root password>
70 > make install
71 > ldconfig
72 > exit
73
74 If you want to remove wxWindows on Unix you can do this:
75
76 > su <type root password>
77 > make uninstall
78 > ldconfig
79 > exit
80
81 You can set many options to configure. Type
82
83 > ./configure --help
84
85 and you will get a list of supported options.
86
87
88 * Using wxMGL library built with configure
89 -------------------------------------------
90
91 'make install' will install wx-config script that can (and should) be used
92 to get compiler flags that are needed to build your program. wx-config --cxxflags
93 will output necessary C++ compiler flags and wx-config --libs will list all
94 needed libraries. See an example of wxWindows application makefile:
95
96 minimal: minimal.o
97 $(CC) -o minimal minimal.o `wx-config --libs`
98
99 minimal.o: minimal.cpp mondrian.xpm
100 $(CC) `wx-config --cxxflags` -c minimal.cpp -o minimal.o
101
102
103 * Using configure to build MS-DOS version
104 ------------------------------------------
105
106 Even though configure is a Unix script, you can use it to build MS-DOS version
107 of the wxMGL library. There are two possible ways to achieve this: you can
108 either cross-compile from Unix or compile natively. Either way you will needed
109 the DJGPP port of GCC compiler freely available from http://www.djgpp.org. You will
110 also need DJGPP version of SciTech MGL (this must be built using native tools).
111
112 Cross-compilation is very easy. It works like ordinary compilation with configure,
113 you only have to specify the target:
114
115 > ./configure --with-mgl --build=i586-linux --host=i586-pc-msdosdjgpp
116 > make
117
118 If you want to build wxMGL natively using DJGPP compiler, you will have to install
119 a couple of Unix utilities. The easiest way to get them is to install the Cygwin
120 package (available from RedHat, see http://freshmeat.net/search/?q=cygwin for exact
121 URL). Cygwin contains win32 compiler, so make sure you did *not* install it! Once
122 you have Cygwin utilities and DJGPP compiler in your PATH, run bash.exe and type
123
124 > ./configure --with-mgl
125 > make
126
127 in wxWindows top directory. You can build wxMGL in MS-DOS with configure, sorry.
128
129
130 * Building wxMGL for MS-DOS using Watcom C/C++
131 -----------------------------------------------
132
133 You will need Watcom C/C++ compiler version 11 or newer (Watcom is going to be
134 OpenSourced by SciTech, check out http://www.openwatcom.org).
135
136 1. Edit $(WXDIR)\include\wx\univ\setup.h to suit your needs (in same way as you
137 do when compiling wxMSW).
138
139 2. Go to $(WXDIR)\src\mgl and run
140 > wmake -f makefile.wat all
141
142 3. You can compile the samples by typing 'wmake -f makefile.mgl all' in sample
143 directory if this file is available. If it is not, copy makefile.wat to
144 makefile.mgl and replace the line that says
145
146 !include $(WXDIR)\src\makeprog.wat
147
148 with
149
150 !include $(WXDIR)\src\mgl\makeprog.wat
151
152
153 Bug reports
154 -----------
155
156 Please send bug reports with a description of your environment,
157 compiler and the error message(s) to the wxwin-developers mailing list at:
158
159 wx-dev@lists.wxwindows.org
160
161 Vaclav Slavik, Julian Smart, Robert Roebling and Vadim Zeitlin, February 2002.