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