Difference between revisions of "Installation"

From KlayGE
Jump to: navigation, search
Line 14: Line 14:
  
 
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.
 
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.
 +
 +
== See Also ==
 +
[[Platforms]]
  
 
[[zh:安装]]
 
[[zh:安装]]
 
[[ru:Установка]]
 
[[ru:Установка]]

Revision as of 02:48, 21 July 2014

Before compiling KlayGE, Python 2.7+ and CMake 2.8.6+ must be installed first. Then you can run build_external.py to build and install third-party libraries and tools. KlayGE has been tested on these compilers.

Since KlayGE 3.12.0, include and lib paths are set up inside the project files. After extraction, just open the corresponding project file under "Build" directory, KlayGE itself can be built directly. Or you can run build_all.py to do that job.

Since KlayGE 4.1.0, project files are migrated to cmake. Several on-stop compiling scripts written in Python is also included. The build_glloader.py is used for compiling glloader; the build_kfont.py for kfont; the build_KlayGE.py for KlayGE, Samples, Tools and Tutorials. The build_all.py can build all of them. Those .py have two optional parameters. The first one is compiler name, the second one is configuration name. For example, "build_all.py vc10 x64" means uses vc10's x64 configuration for compiling. Currently, compiler names such as vc8, vc9, vc10, vc11, vc12, mingw and gcc are supported. Configuration names such as x86, x64, x86_app, and arm_app are supported. If no parameter in the command line, default parameters inside cfg_build.py will be used.

Since KlayGE 4.4.0, 3rd party libraries uses cmake as project files. You only need to run build_external.py to finish the build, not native project files provided by 3rd party libraries themselves.

Sincd KlayGE 4.5.0, Android and WinRT version can be build with the same cmake, too. Before that, you need a Windows version of tools. They are used in the process of building Android and WinRT version.

During the compilation, if the vc said couldn't find v110_xp toolset, please install Visual Studio 2012 Update or up.

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.

See Also

Platforms