File: cs_29.html

package info (click to toggle)
crystalspace 0.94-20020412-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 62,276 kB
  • ctags: 52,843
  • sloc: cpp: 274,783; ansic: 6,608; perl: 6,276; objc: 3,952; asm: 2,942; python: 2,354; php: 542; pascal: 530; sh: 430; makefile: 370; awk: 193
file content (246 lines) | stat: -rw-r--r-- 8,682 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created by texi2html 1.64 -->
<!-- 
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
 
-->
<HTML>
<HEAD>
<TITLE>Crystal Space: MinGW</TITLE>

<META NAME="description" CONTENT="Crystal Space: MinGW">
<META NAME="keywords" CONTENT="Crystal Space: MinGW">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">

</HEAD>

<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">

<A NAME="SEC91"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_28.html#SEC76"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_30.html#SEC98"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_25.html#SEC35"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_19.html#SEC29"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_43.html#SEC117"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<HR SIZE=1>
<H3> 2.4.3 Windows using MinGW </H3>
<!--docid::SEC91::-->
<P>

<EM>Philip Wyett <A HREF="mailto:philipwyett@dsl.pipex.com">philipwyett@dsl.pipex.com</A>.</EM>
<EM>Last updated December 11, 2001</EM>
</P><P>

These instructions are for building Crystal Space with MinGW--a GNU
compiler for Windows.  There are many different versions of the GNU
Windows compiler and problems arise with some Windows header files
containing non-standard code used by Microsoft, so we recommend
the MinGW compiler which is currently best supported by Crystal Space.
</P><P>

<A NAME="SEC92"></A>
<H4> Necessary Resources </H4>
<!--docid::SEC92::-->
<P>

Download the following packages:
</P><P>

<UL>
<LI>
Crystal Space MinGW package `<TT>cs_mingw_0.92.exe</TT>' from the Mingw32 support
directory at Linux Games.  This package contains all the recent MinGW package
releases (i.e. all the files necessary to compile Crystal Space successfully).
<P>

<A HREF="ftp://ftp.sunsite.dk/projects/crystal/support/mingw32/cs_mingw_0.92.exe">ftp://ftp.sunsite.dk/projects/crystal/support/mingw32/cs_mingw_0.92.exe</A>
</P><P>

<LI>
NASM (Netwide Assembler) for Windows `<TT>nasm-0.98e-bin-w32.zip</TT>'
<P>

<A HREF="ftp://ftp.sunsite.dk/projects/crystal/support/nasm/nasm-0.98e-bin-w32.zip">ftp://ftp.sunsite.dk/projects/crystal/support/nasm/nasm-0.98e-bin-w32.zip</A>
</UL>
<P>

<A NAME="SEC93"></A>
<H4> Installation </H4>
<!--docid::SEC93::-->
<P>

Follow these instructions to install the packages which you downloaded.
</P><P>

<UL>
<LI>
First install the MinGW compiler.  The file is a self extracting executable and
will create the `<TT>mingw32</TT>' directory for you.  So if you wish to install it
to your `<TT>C:\</TT>' drive as `<TT>C:\mingw32\</TT>', extract the archive to
`<TT>C:\</TT>'.
<P>

The following instructions assume the MinGW package is installed in
`<TT>C:\mingw32</TT>'.
</P><P>

<LI>
Unzip the NASM archive files and copy the `<TT>.exe</TT>' files into
`<TT>C:\mingw32\bin</TT>'.
<P>

<LI>
Adjust your `<SAMP>PATH</SAMP>' environment variable.  On Windows 95 and 98 edit the
`<TT>C:\autoexec.bat</TT>' file add the following entry:
<P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>SET PATH=C:\mingw32\bin
</pre></td></tr></table></P><P>

You must also add the following variables, so that GCC can find the Python
header files.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>SET PYTHON_INC=C:\mingw32\include\python1.5
SET PYTHONPATH=C:\mingw32\lib\python1.5
</pre></td></tr></table></P><P>

On Windows NT, 2000 and XP, use the System control panel to edit the
environment variable.
</P><P>

If you fail to do so, then the `<TT>makedep</TT>' tool will not know where to look
for Mingw32's system include files, and will emit a lot of warnings.
</P><P>

<LI>
Reboot your computer.
</UL>
<P>

<A NAME="SEC94"></A>
<H4> Building  </H4>
<!--docid::SEC94::-->
<P>

From within the Crystal Space directory (`<TT>CS\</TT>'), run the `<SAMP>make</SAMP>'
command and follow the instructions.  Typically, you would issue the following
commands:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>make win32gcc MODE=debug
make depend
make -k all
</pre></td></tr></table></P><P>

Some Windows ME users have reported a system crash when running the 
`<SAMP>make win32gcc</SAMP>' command. If you have that problem, try adding
`<SAMP>FORCEBUCK=SS</SAMP>' to the command line, like this:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>make win32gcc MODE=debug FORCEBUCK=SS
make depend
make -k all
</pre></td></tr></table></P><P>

Note that making the `<SAMP>depend</SAMP>' target is not absolutely required.  If
doing so presents problems, then you can safely omit it:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>make win32gcc MODE=debug
make -k all
</pre></td></tr></table></P><P>

<A NAME="SEC95"></A>
<H4> Additional Command Line Compile Options </H4>
<!--docid::SEC95::-->
<P>

You can also insert the `<SAMP>clean</SAMP>' makefile target into the `<SAMP>make</SAMP>'
command, as follows:
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>make -k clean all
</pre></td></tr></table></P><P>

This will first remove all object files, libraries, etc.  from the
`<TT>CS\out\WIN32\X86\debug</TT>' directory and will then build the entire project.
</P><P>

The `<SAMP>-k</SAMP>' option used in the `<SAMP>make -k all</SAMP>' command instructs the
compiler to ignore errors and continue compiling regardless.
</P><P>

<A NAME="SEC96"></A>
<H4> Customizing </H4>
<!--docid::SEC96::-->
<P>

You may need to customize settings in `<TT>CS\libs\cssys\win32\win32gcc.mak</TT>',
the Mingw32 makefile.  Check the following variables:
</P><P>

<UL>
<LI>
<CODE>LIBS.GL3D.SYSTEM</CODE>
<LI>
<CODE>LIBS.SOCKET.SYSTEM</CODE>
<LI>
<CODE>LIBS.SOUND.SYSTEM</CODE>
</UL>
<P>

Adjust them to match your system libraries.  For example, if you use the
SGI OpenGL SDK instead of Microsoft's OpenGL, change
`<SAMP>-lopengl32</SAMP>' and `<SAMP>-lglut32</SAMP>' to `<SAMP>-lopengl</SAMP>' and `<SAMP>-lglut</SAMP>' in
`<SAMP>LIBS.GL3D.SYSTEM</SAMP>'.  Also in the file `<TT>CS\mk\user.mak</TT>' select which
plugins you wish to compile.
</P><P>

<A NAME="SEC97"></A>
<H4> Troubleshooting </H4>
<!--docid::SEC97::-->
<P>

If you successfully compiled Crystal Space, yet find that you cannot run the
applications from the `<TT>CS\</TT>' root directory, a possible cause might be that
the pathname leading up to the `<TT>CS\</TT>' directory may have whitespace in it.
For instance, if you installed the project in `<TT>C:\my stuff\CS</TT>', try
renaming the path to `<TT>C:\my_stuff\CS</TT>' or `<TT>C:\mystuff\CS</TT>'.
</P><P>

<A NAME="NeXT"></A>
<HR SIZE=1>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_28.html#SEC76"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_30.html#SEC98"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_25.html#SEC35"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_19.html#SEC29"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_43.html#SEC117"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>  
<FONT SIZE="-1">
This document was generated

using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>

</BODY>
</HTML>