Difference between revisions of "Installation"

From KlayGE
Jump to: navigation, search
m
Line 1: Line 1:
Before compiling [[KlayGE]], some [[third-party libraries and tools]] must be installed.
+
Before compiling [[KlayGE]], some [[Third-party Libraries and Tools|third-party libraries and tools]] must be installed.
  
 
Since [[KlayGE]] 3.10.0, include and lib paths are set up inside the project files. After extraction, just open the corresponding project file under "Build" directory, [[KlayGE/en|KlayGE]]itself can be built directly. If you need to use the engine to develop your own projects, you need to do some additional setup:
 
Since [[KlayGE]] 3.10.0, include and lib paths are set up inside the project files. After extraction, just open the corresponding project file under "Build" directory, [[KlayGE/en|KlayGE]]itself can be built directly. If you need to use the engine to develop your own projects, you need to do some additional setup:

Revision as of 05:58, 25 April 2011

Before compiling KlayGE, some third-party libraries and tools must be installed.

Since KlayGE 3.10.0, include and lib paths are set up inside the project files. After extraction, just open the corresponding project file under "Build" directory, KlayGEitself can be built directly. If you need to use the engine to develop your own projects, you need to do some additional setup:

  1. Run the env_vars.py under KlayGE directory. The script sets the environment variable "KLAYGE_HOME", and adds the "bin" directory into OS's PATH
  2. environment variable. If you do not have pywin32 installed, you may need to manually modify the environment variables, or restart your computer.
  3. Set the pathes. Taking Visual Studio 2008 as an example (for other IDEs, please refer to their own help files):
    1. Open "Tools"->"Options"->"Projects and Solutions"->"VC++ Directories", select "Include files" in "Show directories for:" drop-down box, adds $(KLAYGE_HOME)\Core\Include and $(KLAYGE_HOME)\Plugins\Include.
    2. Select "Library files" in "Show directories for:", adds $(KLAYGE_HOME)\lib\Win32(For x64 version, replace "Win32" by "x64").
    3. Click "OK". It's recommended to restart Visual Studio in order to ensure the environment settings have been saved properly.

Notes for MinGW users:

There are some incompatibilities between new versions of the Windows SDK/DirectX SDK and MinGW. When compiling the DirectSound plug-in, and the compiler will report sal.h cannot be found. VC's "sal.h" needs to be copied to "MinGW/include". Then open "MinGW/lib/gcc/mingw32/4.4.1/include/stddef.h", replace "#define NULL __null" by "#define NULL 0". Otherwise, sal.h will define __null to some other token incorrectly.