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