File: cs_26.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 (733 lines) | stat: -rw-r--r-- 27,370 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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
<!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: MSVC5</TITLE>

<META NAME="description" CONTENT="Crystal Space: MSVC5">
<META NAME="keywords" CONTENT="Crystal Space: MSVC5">
<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="SEC36"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_25.html#SEC35"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_27.html#SEC57"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_20.html#SEC30"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_25.html#SEC35"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_29.html#SEC91"> &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>
<H4> 2.4.2.1 Microsoft Visual C++ 5 </H4>
<!--docid::SEC36::-->
<P>

Compiling Crystal Space with <EM>Microsoft Developer Studio 5</EM>
or the standalone version of <EM>Microsoft Visual C++ 5</EM> with 
Service Pack (SP) 3 additionally installed is not strictly
supported. However, some of the Crystal Space developers have fairly
successfully compiled most, if not all, of the Crystal Space codebase. Please
read the following sections and FAQ carefully.
</P><P>

<A NAME="SEC37"></A>
<H4> Getting Extra Help </H4>
<!--docid::SEC37::-->
<P>

If you need help with Crystal Space and Visual C++ or just Crystal Space in
general, you can subscribe and then post a message to the Crystal Space
mailing list.  To subscribe see the following site and fill in the form:
</P><P>

<A HREF="http://lists.sourceforge.net/lists/listinfo/crystal-main">http://lists.sourceforge.net/lists/listinfo/crystal-main</A>
</P><P>

Alternatively you can email the Win32 port maintainer directly at the
following:
</P><P>

<A HREF="mailto:philipwyett@dsl.pipex.com">philipwyett@dsl.pipex.com</A>.
</P><P>

<A NAME="SEC38"></A>
<H4> Required/Optional External Libraries and Software </H4>
<!--docid::SEC38::-->
<P>

All the following libraries and Software Development Kits (SDK) unless
stated are <EM>not</EM> required.  However, if you chose not to install them, at
compile time you must follow the documented instructions of how to unload these
projects from the Crystal Space build process.
</P><P>

<A NAME="SEC39"></A>
<H4> msvc_libs - Required </H4>
<!--docid::SEC39::-->
<P>

Before you attempt to compile Crystal Space, you must download
and install `<TT>msvc_libs</TT>'.  msvc_libs is a package containing all
third party header, pre-built library and dll files used by Crystal
Space, i.e. `<TT>zlib.dll</TT>', `<TT>libjpeg.dll</TT>', `<TT>png.dll</TT>' and
`<TT>xmlparse.dll</TT>' etc.  The latest version of the msvc_libs package
`<TT>msvc_libs_0.94.zip</TT>' can be downloaded from:
</P><P>

<A HREF="ftp://ftp.sunsite.dk/projects/crystal/support/win32/msvc_libs_0.94.zip">ftp://ftp.sunsite.dk/projects/crystal/support/win32/msvc_libs_0.94.zip</A>
</P><P>

<A HREF="ftp://62.188.48.183/crystal_space/support/win32/msvc_libs_0.94.zip">ftp://62.188.48.183/crystal_space/support/win32/msvc_libs_0.94.zip</A>
</P><P>

Once you have downloaded the msvc_libs package, extract it to your `<TT>CS\</TT>'
root directory.
</P><P>

<A NAME="SEC40"></A>
<H4> OpenGL </H4>
<!--docid::SEC40::-->
<P>

The required headers and library files for compiling the Crystal Space OpenGL
related plugins, are included within the Visual C++ 5 distribution.
However, optionally you can also install and use Silicon Graphics' own OpenGL
Software Development Kit (SDK) for Windows.  If you wish to do this, it
can be obtained from:
</P><P>

<A HREF="http://www.meer.net/~gold/OpenGL/sgi-opengl.html">http://www.meer.net/~gold/OpenGL/sgi-opengl.html</A>
</P><P>

<A NAME="SEC41"></A>
<H4> DirectX - Required </H4>
<!--docid::SEC41::-->
<P>

In order to compile Crystal Space at its minimum i.e. the software render,
requires you must have at least some form of the DirectX Software Development
Kit (SDK) on your system.
</P><P>

<UL>
<LI>
DirectX 5.0 or higher is required.  With this, you get the sound output and
non-accelerated graphics package.
<P>

<LI>
DirectX 6.1 or higher (including DirectX 8a) allows hardware-accelerated 3D
graphics.
</UL>
<P>

Visual C++ 5 does <EM>not</EM> come with any DirectX SDK as part of it's
distribution, so you will need to download at least one version of the
DirectX SDK and install it on your system. *** TODO ***
</P><P>

To enable you to build Crystal Space to its optimum D3D support, you must
download the latest DirectX Software Development Kit (SDK), which can be
obtained from:
</P><P>

<A HREF="http://www.msdn.microsoft.com/directx">http://www.msdn.microsoft.com/directx</A>
</P><P>

If you are unable to accomplish the 100+Mb (For the full SDK) or 43Mb (For
the Visual-C only parts of the SDK) download of the DirectX 8a SDK
from the link above, you can obtain the cut down older versions (6 &#38; 7 with no
documents or example code) of the DirectX SDK's from the following
website:
</P><P>

<A HREF="http://www.multimania.com/noote/CrystalSpace">http://www.multimania.com/noote/CrystalSpace</A>
</P><P>

Thanks, to the miracle which is Microsoft.  If you download and install the
latest DirectX 8a Software Development Kit (SDK) and already have Visual
C++ installed, it will ask you if you wish to add the paths to the SDK to
Visual C++ so it can use it.  We recommend you accept when offered this option.
If it is not the latest SDK you install you will have to manually point
Visual C++ to where you installed the SDK in-order for it to be used.
This can be done from the Visual C++ file menu and selecting
<EM>Tools-&#62;Options-&#62;Directories</EM>.  You must add the paths for both the
include files and libraries and being that we wish Visual C++ to see and use
this new SDK before all possible others on your system, you must click on
and drag both paths you have entered to the top of the list.
</P><P>

<A NAME="SEC42"></A>
<H4> Simple Direct Media Layer </H4>
<!--docid::SEC42::-->
<P>

Crystal Space contains support for a Simple Direct Media Layer 2D canvas which
can be used as an alternative to the default Direct Draw canvas for use with
the Crystal Space software 3D renderer.  To compile the SDL2D canvas you must
have the supported 1.2.3 development runtime for your version of MSVC be
it 5 or 6.  Please remeber to add the `<TT>include</TT>' and `<TT>lib</TT>' directories
to the global MSVC options, so MSVC can see them.
</P><P>

<A HREF="http://www.libsdl.org">http://www.libsdl.org</A>
</P><P>

Also remember to copy the `<TT>sdl.dll</TT>' into the `<TT>CS\</TT>' root directory
or at it to your systems path before using the SDL2D canvas.
</P><P>

For instructon on using a specific canvas including
the SDL2D canvas <A HREF="cs_46.html#SEC120">3.1 Common Command Line Options</A>
</P><P>

<A NAME="SEC43"></A>
<H4> Python </H4>
<!--docid::SEC43::-->
<P>

Crystal Space contains support for Python scripting and thus has projects
within it requires that Python be installed on your system.  If you wish to
compile with Python support you must install Python 1.5.2 or later, which can be
obtained from:
</P><P>

<A HREF="http://www.python.org">http://www.python.org</A>
</P><P>

Note: To correctly build the CS Python plugin with Python version later than
1.5.2 in <EM>CS\plugins\cscript\cspythoncs_pyth.cpp'</EM> Now find the code lines
49 - 55 inclusive  i.e.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>#ifdef __cplusplus
extern "C" {
#endif
#include "Python.h"
#ifdef __cplusplus
}
#endif
</pre></td></tr></table></P><P>

The above 'extern "C"' will cause problems because MS put C++ 
template code right in the middle of MSVC's math.h and for that blows 
out some nice errors. To avoid this edit the above to match the 
following.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>//#ifdef __cplusplus
//extern "C" {
//#endif
#include "Python.h"
//#ifdef __cplusplus
//}
//#endif
</pre></td></tr></table></P><P>

<A NAME="SEC44"></A>
<H4> BisonFlex </H4>
<!--docid::SEC44::-->
<P>

The Alternate Window System (AWS) plugin will build correctly under MSVC.
However, if you wish to make modifications to it's structure and/or lexer, it will
require you re-generate <EM>sllex.cpp, slparse.cpp, slparse.cpp.h and slparse.h</EM>.
If you need todo this will require you have Bison and Flex on your system. The
suggested and supported version can be obtained via the link below.
</P><P>

For Visual C++ 5:
</P><P>

<A HREF="http://www.philipwyett.dsl.pipex.com/crystal_space/msvc/downloads/bfwizard-1.5.zip">http://www.philipwyett.dsl.pipex.com/crystal_space/msvc/downloads/bfwizard-1.5.zip</A>
</P><P>

Install this package to a location of your choice on your system. During the install
process, it will detect MSVC and install itself in the appropraiate directories and
the executables in the system path. We suggest you agree to it's automatic detections. 
</P><P>

<A NAME="SEC45"></A>
<H4> Setting up and building the AWS plugin </H4>
<!--docid::SEC45::-->
<P>

To re-generate the files mentioned above. Open a <EM>MS-DOS Prompt/Command Prompt</EM> and
navigate to the <EM>CS\</EM> root directory. Next, just enter the command lines listed
below.
</P><P>

<CODE>flex -L -Splugins/aws/flex.skl -t plugins/aws/skinlang.flx &#62; plugins/aws/sllex.cpp</CODE>
</P><P>

<CODE>bison --no-lines -d -p aws -o plugins/aws/slparse.cpp plugins/aws/skinlang.bsn</CODE>
</P><P>

Now just follow the <EM>Compiling Crystal Space</EM> instructions to again re-build AWS
with your modifications included.
</P><P>

<A NAME="SEC46"></A>
<H4> Creative EAX 2.0 </H4>
<!--docid::SEC46::-->
<P>

In order to build the CS EAX 2.0 enviromental audio plugin (<EM>plgsndrdreax</EM>), requires
you have the EAX 2.0 SDK on your system. The SDK can be obtained from the following website.
</P><P>

<A HREF="http://developer.creative.com/LEFTMENU/DC_LM_Downloads.asp">http://developer.creative.com/LEFTMENU/DC_LM_Downloads.asp</A>
</P><P>

After installtion you will need to point MSVC to the SDK's include and lib paths.
</P><P>

<A NAME="SEC47"></A>
<H4> Compiling Crystal Space </H4>
<!--docid::SEC47::-->
<P>

To compile Crystal Space, you'll have to perform the following steps.  If
anything doesn't work, see the Win32 FAQ,  <A HREF="cs_26.html#MSVC5 FAQ">MSVC5 FAQ</A>.
</P><P>

<OL>
<LI>
Load `<TT>Crystal Space\mk\visualc\csall.dsw</TT>'.
<P>

<LI>
Remove all projects you don't want to compile.  To do this, right-click on the
project in the list and select <EM>Unload Project</EM>.  Examples of projects
which you don't want to compile might include `<SAMP>plgopengl</SAMP>' if you do not
have the OpenGL SDK insatalled, or `<SAMP>plgcspython</SAMP>' if you do not have
the Python SDK installed.
<P>

<LI>
Make `<SAMP>grpall</SAMP>' your active project.  This is done by right clicking on it
and then clicking on <EM>Set as Active Project</EM>.
<P>

<LI>
From the file menu selct <EM>Build-&#62;Rebuild All</EM> or alernatively hit your
<KBD><KBD>F7</KBD></KBD> key.
<P>

<LI>
After a while the compilation should finish without error.  The signal for a
successful build will be come in the form of the something similar to the
following:
<P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>------------ Configuration: grpall - Win32 Debug ------------

grpall.lib - 0 error(s), 0 warning(s)
</pre></td></tr></table></OL>
<P>

<A NAME="SEC48"></A>
<H4> Running the Demonstration Applications </H4>
<!--docid::SEC48::-->
<P>

The first app you should try is Walktest.  This program shows many of the
features of the 3D engine.  You can run it by starting it from the windows
explorer.  It should be at `<TT>.../cs/walktest.exe</TT>'.  Don't start it from
other locations or from within Visual Studio.  It won't find the required files
if you do.
</P><P>

If you want to run a debug session, you first have to set the working
directory.  Open <EM>Project/Settings</EM>, select the appWalktest project,
switch to the <EM>Debug</EM> tab and enter the base `<TT>CS\</TT>' directory as the
working directory for debug sessions (for example, `<TT>C:\CS\</TT>').  Be sure to
to this for <EM>Debug</EM> and <EM>Release</EM> builds.
</P><P>

You can now continue with the next platform-independent step.  The remaining
Windows-specific sections are only important when you want to compile your own
application using Crystal Space.
</P><P>

<A NAME="SEC49"></A>
<H4> Structure of the Workspace </H4>
<!--docid::SEC49::-->
<P>

<EM>Note</EM>: If you find bugs in the MSVC project or workspace files
coming with Crystal Space, don't send fixes for these files to the developers.
These files are generated automatically, so your fixes would be useless.
Better, send a description of the bug to the mailing list.
</P><P>

The Crystal Space workspace is divided into several projects.  They all exist
as separate project files (`<TT>*.dsp</TT>').  All of them are being bound together
by a workspace `<TT>csall.dsw</TT>'.  This workspace will also ensure correct
linking between the various projects.
</P><P>

The workspace uses a prefix system for naming the projects and grouping them.
There are currently four prefixes in use.  The prefix `<TT>grp</TT>' is used to
group the projects into the three main categories: <EM>libraries</EM>,
<EM>plug-ins</EM>, and <EM>applications</EM>.  There is also a special group
`<SAMP>grpall</SAMP>' that contains the three major groups `<SAMP>grplibs</SAMP>',
`<SAMP>grpapps</SAMP>', and `<SAMP>grpplugins</SAMP>'.
</P><P>

The <EM>Libraries</EM> are C++ libraries that you can link into your own
programs.  Some of these libraries are part of the core of Crystal Space.  You
can find more information about this in <A HREF="cs_128.html#SEC290">6. Libraries</A>.  Their output are
`<TT>.lib</TT>' files.
</P><P>

The <EM>Plugins</EM> are also programming libraries, but they use a special
mechanism called SCF as their interface to your program.  This separates
their interface from the internals of the library and thus allows dynamic
linking.  In fact, some of the <EM>Libraries</EM> also use SCF.  The rule
for the MSVC workspace is simple: The <EM>Plugins</EM> are projects that
build a dynamic library (`<TT>.dll</TT>').  You can find more information in the
section of this manual dealing with plug-in modules.  See section <A HREF="cs_159.html#SEC338">7. Plug-In Modules and Drivers</A>.
</P><P>

The <EM>Applications</EM> are programs using some of these libraries, so they
produce `<TT>.exe</TT>' files.
</P><P>

<A NAME="SEC50"></A>
<H4> Compiling Your Own Program Using Crystal Space </H4>
<!--docid::SEC50::-->
<P>

It is assumed that you have set up MSVC projects before.  If you want to
create a project using Crystal Space, you have two possibilities how to do
this: You can either create the project inside the Crystal Space workspace, or
you can create a new workspace.  Either way, you have to do the usual setup,
like adding the source files.  In addition to this, you must perform the
following steps.
</P><P>

<UL>
<LI>
Set the output path to the `<TT>Crystal Space</TT>' root directory.  Any Crystal
Space application must be executed in this directory.  If you want to run it in
another directory, you must copy the files `<TT>scf.cfg</TT>' and `<TT>vfs.cfg</TT>',
the data directory and all plugins (`<TT>.dll</TT>') into this new directory, or
set the `<SAMP>CRYSTAL</SAMP>' environment variable to your Crystal Space directory.
<P>

<LI>
Set the include paths.  Simply open one of the application projects coming with
Crystal Space, for example WalkTest, select
<EM>Project Settings/C/C++</EM> and copy all command line options that look like
this: `<SAMP>/I "../../anything"</SAMP>'.
<P>

<LI>
Add the Crystal Space libraries.  If you are using the Crystal Space workspace,
simply add dependencies to the Crystal Space projects.  Otherwise you have to
link to the `<TT>.lib</TT>' files.  To do this, either add these files to the
project like source files or add them as command line options in <EM>Project
Settings/C/C++</EM>.  Note that if you add them like source files, you may wish
to add the release libraries to a <EM>Release</EM> folder and the debug libs to
a <EM>Debug</EM> folder, and disable each of these
(<EM>Project Settings/General</EM>) for the opposite type of build.
<P>

<LI>
Add external libraries (`<TT>zlib</TT>', `<TT>libjpeg</TT>', `<TT>DirectX</TT>', ...).
They can be added just like the Crystal Space libraries, except that you can
not use project dependencies.
</UL>
<P>

<A NAME="SEC51"></A>
<H4> Frequently Asked Questions (FAQ) </H4>
<!--docid::SEC51::-->
<A NAME="MSVC5 FAQ"></A>
<P>

This is the list of frequently asked questions for the Win32 port of Crsytal
Space.  Please consult this list if you are having difficulty building or using
the project.
</P><P>

<A NAME="SEC52"></A>
<H4> Compilation </H4>
<!--docid::SEC52::-->
<P>

<UL>
<LI>
Q. <EM>I get errors like the following:</EM>
<P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>plugins\video\canvas\ddraw8\i_g2d.h(14) : error C2061:
  syntax error : identifier 'LPDIRECTDRAW7'
plugins\video\canvas\ddraw8\i_g2d.h(16) : error C2061:
  syntax error : identifier 'LPDIRECTDRAWSURFACE7'
</pre></td></tr></table></P><P>

A. You are not using the DirectX SDK 8 or higher. Either you have not
installed the correct DirectX SDK, or you haven't told MSVC to use
it instead of the older SDK included with MSVC. Either install the
SDK correctly or unload the DirectX 8 related projects.
</P><P>

<LI>
Q. <EM>Where are the `<TT>zlib.h</TT>', `<TT>png.h</TT>' and `<TT>jpeglib.h</TT>' files?</EM>
<P>

A. Those files are not part of the Crystal Space project, but they are
required to build it.  You must get a version of the following packages, most
of which can be easily found on the Internet.  You can download precompiled
versions of these libraries <EM>msvc_libs</EM> or grab the source code and compile
it yourself if you prefer.  See section <A HREF="cs_18.html#SEC25">2.3 External Libraries</A>.
</P><P>

The resources from these packages should be placed in the following locations.
</P><P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>CS\libjpeg.dll
CS\png.dll
CS\zlib.dll
CS\include\cssys\win32\jconfig.h
CS\include\cssys\win32\jerror.h
CS\include\cssys\win32\jinclude.h
CS\include\cssys\win32\jmorecfg.h
CS\include\cssys\win32\jpeglib.h
CS\include\cssys\win32\png.h
CS\include\cssys\win32\pngconf.h
CS\include\cssys\win32\zconf.h
CS\include\cssys\win32\zlib.h
CS\libs\cssys\win32\libs\zlib.lib
CS\libs\cssys\win32\libs\png.lib
CS\libs\cssys\win32\libs\libjpeg.lib
</pre></td></tr></table></P><P>

Note that the source code package generally already contains the files from the
`<TT>include</TT>' and `<TT>libs</TT>' directories, so you may not have to bother with
them.  The CVS repository contains these files as well.
</P><P>

<LI>
Q. <EM>How can I reduce build times?</EM>
<P>

A. Build only the projects you will need. You must build all the Crystal Space
libraries, however those you may not need can be unloaded (Right click on the
project you wish unload from the build process and click on Unload). <EM>Be
very careful when unloading projects as some of Crystal Spaces projects e.g. some
plugins are dependant on others</EM>.
</P><P>

<LI>
Q. <EM>How can I reduce build sizes?</EM>
A. Build only the projects you will need.
A. Turning off precompiled headers tends to save a large amount of file space
while increasing build times somewhat.
</UL>
<P>

<A NAME="SEC53"></A>
<H4> Linking </H4>
<!--docid::SEC53::-->
<P>

<UL>
<LI>
Q. <EM>Where are the files `<TT>png.lib</TT>' and `<TT>zlib.lib</TT>'?</EM>
<P>

A. Just look above at the question about `<TT>zlib.h</TT>' and `<TT>png.h</TT>'.
It's the same problem, and if you have already done what is explained there,
I can't do much for you!
</P><P>

<LI>
Q. <EM>I've got unresolved symbols.</EM>
<P>

A. What kind of symbols?
</P><P>

<UL>
<LI>
`<SAMP>_png_<small>...</small></SAMP>': That means that you don't link the project with
`<TT>png.lib</TT>'.  Just take a look below where it is explained how to do so.
<P>

<LI>
`<SAMP>_inflate<small>...</small></SAMP>' and `<SAMP>_deflate<small>...</small></SAMP>': Well, it seems to your
project lacks `<TT>zlib.lib</TT>'.  The trick is explained just below, so hang on.
<P>

<LI>
`<SAMP>_DirectDraw<small>...</small></SAMP>': Same as above, but for `<TT>ddraw.lib</TT>' (DirectX
component), look below.
<P>

<LI>
Any others: Well, I always have a solution, but this one is more difficult.  It
seems that there is a missing source file in your project.  But the question
is, which source file?  If it isn't obvious by the name of the functions, just
to the following: In the menu <EM>Edit</EM>, select the option <EM>Find in
Files<small>...</small></EM>.  Put the name of the function in the field "Find What", check
that the "In Folder" field content is the Crystal Space source directory and
press <EM>Find</EM>.  You should get a bunch of files, many of them just making a
call to the function.  But there is surely one which contains the definition of
the function.  Look at the position of the file where it is defined, and add it
to the project (menu <EM>Project/Add To Project/Files</EM>).
<P>

In order to add (or remove) a library for the link process, invoke the
<EM>Project/Settings/Link</EM> menu item, then select the "General" category
tab..  There is a field called "Object/Library Modules" that lists all the
libraries added to the project at link time.
</UL>
</UL>
<P>

OK, now it should link.  So you should have an executable file called
`<TT>walktest.exe</TT>' in your src directory.  Let's run it!
</P><P>

<A NAME="SEC54"></A>
<H4> Executing </H4>
<!--docid::SEC54::-->
<P>

<UL>
<LI>
Q. <EM>I just get a black screen.</EM>
<P>

A. When I start `<TT>walktest</TT>' I just get a black screen, maybe with some
text output, but after a few seconds it drops back to the normal windows
screen without an error.
</P><P>

This shouldn't happen any more, because in most cases now, `<TT>walktest</TT>' will
display proper error messages.  Anyway, you should make sure you have set an
appropriate directory set (see above).  Make sure you have specified the map
file in `<TT>walktest.cfg</TT>' as `<SAMP>Walktest.Settings.WorldFile=</SAMP>' (also keep
in mind, that your current directory is, where the executable sits.)
</P><P>

<LI>
Q. <EM>I get the following (or similar) errors:</EM>
<P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>WARNING: could not load plugin
  `crystalspace.graphics3d.software'
WARNING: failed to initialize plugin
  `crystalspace.engine.3d'
FATAL: No iGraphics3D plug-in loaded!
FATAL: No iGraphics2D plug-in loaded!
Error initializing system!
</pre></td></tr></table></P><P>

A. You probably did not compile everything. Compiling only the `<TT>.exe</TT>'
file is not sufficient!  You must also compile all plug-ins you want to use.
In the above example the software renderer is missing.
</P><P>

If you are certain that everything is compiled, make sure your working
directory is set to `<TT>CS\</TT>'.  To do this go to the <EM>Project</EM> menu.
Select <EM>Settings</EM> and go to the <EM>Debug</EM> tab.  Change the debug
executate to `<TT>X:\CS\appname</TT>' where `<TT>X:</TT>' is the drive letter where the
Crystal Space project is installed.  Next set the working directory to
`<TT>X:\CS</TT>'.  Click OK and you should be all set.
</P><P>

If after doing this, you are still getting the same error, make sure that you 
have the `<TT>zlib.dll</TT>' installed, the VFS plugin is dependent upon it.
</UL>
<P>

<A NAME="SEC55"></A>
<H4> Miscellaneous </H4>
<!--docid::SEC55::-->
<P>

<UL>
<LI>
Q. <EM>My last update did compile, but now I got a new version from the
CVS repository and everthing seems to be broken.</EM>
<P>

A. When working with Crystal Space, always keep in mind, that this is a
multiplatform project.  So sometimes not all features will work correct on all
platforms.  Sometimes a specific port may even be broken due to changes in
other ports.  Since the introduction of CVS (see  <A HREF="cs_7.html#CVS">CVS</A>) this is usually
only for a short time, so if you got your version out of CVS, it usually
pays off, to post a message describing the problems to the Crystal Space
Mailing List describing you problem and include the exact error messages.  If
you wait a while, this will probably be fixed, or at least be worked around.
See section <A HREF="cs_8.html#SEC10">1.7 Mailing Lists</A>.
</P><P>

<LI>
Q. <EM>I have a problem that you haven't solved here!</EM>
<P>

A. Try sending a note to the Crystal Space mailing list and asking your
question there.  See section <A HREF="cs_8.html#SEC10">1.7 Mailing Lists</A>.  Be sure to include any pertinent
information, such as the operating system you are using, the compiler, which
version of Crystal Space, and any special configuration information.
</UL>
<P>

<A NAME="SEC56"></A>
<H4> Credits </H4>
<!--docid::SEC56::-->
<P>

The author would like to acknowledge the assistance of the following person(s)
in the creation of the Visual C++ 5 documentation.
</P><P>

<UL>
<LI>
Andreas Hofler
</UL>
<A NAME="MSVC6"></A>
<HR SIZE=1>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_25.html#SEC35"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_27.html#SEC57"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_20.html#SEC30"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_25.html#SEC35"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_29.html#SEC91"> &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>