Difference between revisions of "Installation"
From KlayGE
Gongminmin (Talk | contribs) m |
Gongminmin (Talk | contribs) m (2个修订) |
(No difference)
|
Revision as of 23:26, 29 March 2011
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:
- 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
- environment variable. If you do not have pywin32 installed, you may need to manually modify the environment variables, or restart your computer.
- Set the pathes. Taking Visual Studio 2008 as an example (for other IDEs, please refer to their own help files):
- 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.
- Select "Library files" in "Show directories for:", adds $(KLAYGE_HOME)\lib\Win32(For x64 version, replace "Win32" by "x64").
- 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.