[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.4.2.2 Microsoft Visual C++ 7

Philip Wyett philipwyett@dsl.pipex.com. Last updated 4 Feburary 2004.

In order to successfully compile the Crystal Space 3D Software Development Kit (SDK), you will need a copy of Microsoft Developer Studio .NET or the stand alone version of Microsoft Visual C++ 7.

Getting Extra Help

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:

http://lists.sourceforge.net/lists/listinfo/crystal-main

Required/Optional External Libraries and Software

All the following libraries and Software Development Kits (SDK) unless stated are not required. However, if you choose 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.

msvc7_libs - Required

Before you attempt to compile Crystal Space, you must download and install the "msvc7_libs" archive. This archive contains alot of the third party header, pre-built libraries and dll files used by Crystal Space, i.e. `zlib.dll', `libjpeg.dll', `png.dll', etc. The latest version of this archive can be downloaded from:

msvc7_libs with Python 2.2.3 debug components.

ftp://ftp.sunsite.dk/projects/crystal/support/win32/msvc7/msvc7_libs_0.97dev006_py223.zip

msvc7_libs with Python 2.3.0 debug components.

ftp://ftp.sunsite.dk/projects/crystal/support/win32/msvc7/msvc7_libs_0.97dev006_py230.zip

Once you have downloaded the msvc_libs package, extract it to your `CS\' root directory.

DirectX - Required

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.

Visual C++ 7 comes with the minimum DirectX SDK 8.1 pre-release files in-order to build Crystal Space. However, my advice is you download the final 9 version to guarantee complete compliance.

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

http://www.msdn.microsoft.com/directx

Simple Direct Media Layer

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 remember to add the `include' and `lib' directories to the global MSVC options, so MSVC can see them.

http://www.libsdl.org

Also remember to copy the `sdl.dll' into the `CS\' root directory or add it to your systems path before using the SDL2D canvas.

For instructions on using a specific canvas including the SDL2D canvas 3.1 Common Command Line Options

Python

Crystal Space contains support for Python scripting and thus has projects within it requires that Python be installed on your system. Make sure you add the Python include and libs directories to MSVC so that the compiler can see those files. If you wish to compile with Python support you must install Python 2.2 or later, which can be obtained from:

http://www.python.org

NOTE: To have parity with one of the latest versions of msvc_libs and take full advantage of the debug elements - you should have Python 2.2.3 or 2.3.0 installed on your system. Whichever version you decide to use, make sure you download the comparable msvc_libs.

Creative EAX 2.0

In order to build the Crystal Space EAX 2.0 environmental audio plugin (plgsndrdreax), requires you have the EAX 2.0 SDK on your system. The SDK can be obtained from the following location:

http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=37&aid=61&file=EAX20SDK.exe

Developer documentation for EAX 2.0 can be found here:

http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=37&aid=62&file=EAX20ext.pdf

After installation you will need to point MSVC to the SDK's include and lib paths.

Compiling Crystal Space

To compile Crystal Space, you'll have to perform the following steps. If anything doesn't work, see the Win32 FAQ, MSVC7 FAQ.

  1. Load `CS\mk\visualc7\wkstypical.sln'.

  2. From the file menu select Build->Build Solution.

  3. After a while the compilation should finish. The signal for a successful build will be come in the form of the something similar to the following:

     
    Build: 1 succeeded, 0 failed, 0 skipped
    

Running the Demonstration Applications

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 `.../cs/walktest.exe'. Don't start it from other locations or from within Visual Studio. It won't find the required files if you do.

If you want to run a debug session, you first have to set the working directory. First select the project you wish to debug and setting it as the startup project. Next open Project->Properties->Debugging and enter the base `CS\' directory as the working directory for debug sessions (for example, `C:\CS\'). Be sure to to this for Debug and Release builds.

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.

Structure of the Workspace

Note: 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.

The Crystal Space workspace is divided into several projects. They all exist as separate project files (`*.vcproj'). The projects are collected together by workspaces `*.sln'. A workspace will also ensure correct linking between the various projects. There are several workspaces to choose from. Most users should choose the typical workspace, but the others are available for the adventurous.

The workspace uses a prefix system for naming contained projects:

The Libraries 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 6. Libraries. Their output are `.lib' files.

The Plugins 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 Libraries also use SCF. The rule for the MSVC workspace is simple: The Plugins are projects that build a dynamic library (`.dll'). You can find more information in the section of this manual dealing with plug-in modules. See section 7. Plug-In Modules and Drivers.

The Applications are programs using some of these libraries, so they produce `.exe' files.

Compiling Your Own Program Using Crystal Space

TODO Point this to the HOWTO for creating apps under MSVC7.

Frequently Asked Questions (FAQ)

TODO

Compilation

Miscellaneous


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated using texi2html