CMake Error at CMakeLists.txt:442 (ADD_PRECOMPILED_HEADER):

Unknown CMake command "ADD_PRECOMPILED_HEADER".

CMake Warning (dev) in CMakeLists.txt:

No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.8)

should be added at the top of the file. The version specified may be lower

if you wish to support older CMake versions for this project. For more

information run "cmake --help-policy CMP0000".

This warning is for project developers. Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!

CMake Error at CMakeLists.txt:442 (ADD_PRECOMPILED_HEADER):

Unknown CMake command "ADD_PRECOMPILED_HEADER".

CMake Warning (dev) in CMakeLists.txt:

No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.8)

should be added at the top of the file. The version specified may be lower

if you wish to support older CMake versions for this project. For more

information run "cmake --help-policy CMP0000".

This warning is for project developers. Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!

CMake Error at CMakeLists.txt:28 (ADD_DEPENDENCIES):

add_dependencies called with incorrect number of arguments

CMake Error at CMakeLists.txt:30 (SET_TARGET_PROPERTIES):

set_target_properties called with incorrect number of arguments.

CMake Error at CMakeLists.txt:45 (ADD_POST_BUILD):

Unknown CMake command "ADD_POST_BUILD".

CMake Warning (dev) in CMakeLists.txt:

No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.8)

should be added at the top of the file. The version specified may be lower

if you wish to support older CMake versions for this project. For more

information run "cmake --help-policy CMP0000".

This warning is for project developers. Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!

上面有一堆cmake的错误

是我在用build_all.py运行失败之后自己尝试用cmake配置产生的

这些只是因为。。cmake 没用最新版

我使用的cmake 2.8.2

---------------------------------------------------------------------

错误 1 error C2679: 二进制“=”: 没有找到接受“const KlayGE::InputActionMap”类型的右操作数的运算符(或没有可接受的转换) \KlayGE_4_2_0\External\boost\boost\container\detail\pair.hpp 203

错误 25 error C2220: 警告被视为错误 - 没有生成“object”文件 KlayGE_4_2_0\KlayGE\Core\Src\KGEConfig\KGEConfig.cpp 786

这些是在klayGe生成时的错误

是因为vc9的缘故 用vc10/11就不会这样

http://www.opengpu.org/forum.php?mod=viewthread&tid=9659

所以正确的安装方法应该是

1 下载最新 python 和cmake 安装

2 解压klayge

3 cfg_build.py 里面修改成适合自己的配置(可选)

compiler = "vc9" # could be "vc11", "vc10", "vc9", "mingw", "auto".
arch = ("x86", ) # could be "x86", "x64", "arm_app", "x86_app"
config = ("Debug", "RelWithDebInfo") # could be "Debug", "Release", "MinSizeRel", "RelWithDebInfo"

4运行build_all.py

这里用vc9会遇到很多错误 1 error C2679: 二进制“=”: 这样的问题

需要修改

错误 4 error C2039: “i”: 不是“MeshMLLib::MathLib::recip_sqrt::FNI”的成员 e:\KlayGE_4_2_0\MeshMLLib\src\MeshMLLib.cpp 114

union FNI
{
float f;
int32_t i;
} fni;
fni.f = number; // evil floating point bit level hacking
fni.i = 0x5f375a86 - (fni.i >> 1); // what the fuck?
fni.f = fni.f * (threehalfs - (x2 * fni.f * fni.f)); // 1st iteration
fni.f = fni.f * (threehalfs - (x2 * fni.f * fni.f)); // 2nd iteration, this can be removed

return fni.f;
}

int32_t vc9不认识 改成int

----------------------------------------------------------

改完以上两个地方 编译klayge还有如下几个错误

警告 5 warning C4985: “WinMain”: 以前的声明上不存在属性。 e:\KlayGE_4_2_0\KlayGE\Core\Src\KGEConfig\KGEConfig.cpp 786

错误 2 error C2220: 警告被视为错误 - 没有生成“object”文件 e:\KlayGE_4_2_0\KlayGE\Core\Src\KGEConfig\KGEConfig.cpp 786

错误 4 fatal error C1083: 无法打开包括文件:“KHR/khrplatform.h”: No such file or directory E:\KlayGE_4_2_0\glloader\include\glloader\glloader.h 64

这个是少EGL要用的就装上

错误 1 fatal error LNK1181: 无法打开输入文件“libvorbis_static_d.lib” KlayGE_AudioDataSource_OggVorbis

--\KlayGE_4_2_0\External\libvorbis\libs\Win32

这个下面生成的libvorbis_static.lib 复制下改名libvorbis_static_d.lib

libvorbisfile_static.lib 复制下改名libvorbisfile_static_d.lib

 

警告 1 warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library KlayGE_AudioDataSource_OggVorbis

把#ifdef _In_
int WINAPI WinMain(_In_ hInstance, _In_op_ /*hPrevInstance*/, LPSTR /*lpszCmdLine*/, int /*nCmdShow*/)
#else
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpszCmdLine*/, int /*nCmdShow*/)
#endif

改成
#ifdef _In_
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpszCmdLine*/, int /*nCmdShow*/)
#else
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpszCmdLine*/, int /*nCmdShow*/)
#endif

klayge 4.2.0 编译vc9的更多相关文章

  1. CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14

    准备篇: CentOS 7.0系统安装配置图解教程 http://www.osyunwei.com/archives/7829.html 一.配置防火墙,开启80端口.3306端口 CentOS 7. ...

  2. centos 7.0 编译安装php 7.0.3

    php下载页面 http://cn2.php.net/downloads.php 7.0.3多地区下载页面 http://cn2.php.net/get/php-7.0.3.tar.gz/from/a ...

  3. Valgrind 3.11.0编译安装

    Valgrind 3.11.0编译安装 Valgrind是一款用于内存调试.内存泄漏检测以及性能分析的软件开发工具. Valgrind遵守GNU通用公共许可证条款,是一款自由软件. 到3.3.0版本为 ...

  4. android5.0 编译

    android5.0编译需要jdk1.7版本,将来本地可能需要同时维护两套jdk版本,请参考: 在线安装openjdk1.7 sudo apt-get install openjdk-7-jre op ...

  5. VC6.0编译boost

    今天学习了下VC6.0下boost的编译,只是对regex进行了编译,据说全部编译需要2个多小时,在此记录下学习过程中遇到的问题以便今后查看. 最开始直接从网上(www.boost.org)下载了当前 ...

  6. hadoop2.1.0编译安装教程

    由于现在hadoop2.0还处于beta版本,在apache官方网站上发布的beta版本中只有编译好的32bit可用,如果你直接下载安装在64bit的linux系统的机器上,运行会报一个INFO ut ...

  7. hadoop2.1.0和hadoop2.2.0编译安装教程

    由于现在hadoop2.0还处于beta版本,在apache官方网站上发布的beta版本中只有编译好的32bit可用,如果你直接下载安装在64bit的linux系统的机器上,运行会报一个INFO ut ...

  8. Ubuntu 12.04 64bit 配置完android 5.0编译环境后出现“could not write bytes: Broken pipe.”而无法进入输入帐号密码的登陆界面

    Ubuntu 12.04 64bit 配置完android 5.0编译环境后出现“could not write bytes: Broken pipe.”而无法进入输入帐号密码的登陆界面.上网问了问百 ...

  9. varnish 4.0编译安装小记

    varnish 4.0 编译问题 centos-6.5 x86环境 装varnish遇到几个错误要先安装python-docutils然后提示error1,于是安装:libedit-devel然后提示 ...

随机推荐

  1. Javascript之spry菜单栏

    我没有添加任何东西,这是Dreamweaver原汁原味用spry创建的菜单栏,以此来学习菜单导航,哈哈. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTM ...

  2. 如何查看JDK是64bit还是32bit

    在eclipse或MyEclipse中创建一个Java Project并运行如下代码: public class Test { public static void main(String[] arg ...

  3. asp.net C#数据导出Excel实例介绍

    excel导出在C#代码中应用己经很广泛了,我这里就做些总结,供自己和读者学习用. Excel知识点. 一.添加引用和命名空间 添加Microsoft.Office.Interop.Excel引用,它 ...

  4. Redis rdb文件CRC64校验算法 Java实现

    查看RDB文件结构,发现最后的8字节是CRC64校验算得,从文件头开始直到8字节校验码前的FF结束码(含),经过CRC64校验计算发现,貌似最后的8字节是小端模式实现的. 参考redis的crc64实 ...

  5. ios开发:GCD多线程

    ios有三种多线程编程技术,分别是NSThread,Cocoa NSOperation和GCD,GCD全称Grand Central Dispatch 是Apple开发的一个多核编程的解决方法,在iO ...

  6. (转)Redis复制与可扩展集群搭建

    讨论了Redis的常用数据类型与存储机制,本文会讨论一下Redis的复制功能以及Redis复制机制本身的优缺点以及集群搭建问题. Redis复制流程概述 Redis的复制功能是完全建立在之前我们讨论过 ...

  7. VS代码模板

    Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplates\Csharp\Code\2052\Class

  8. sphinx 占用大量内存

    http://www.coreseek.com/forum/2_1847_0.html(转) 刚开始没改下面2句时,内存占用比较多,在生成index的时候就占用了! 下面是解决方法: 每个索引中写上 ...

  9. 【转】Qt使用自带的windeployqt 生成exe来发布软件

    集成开发环境 QtCreator 目前生成图形界面程序 exe 大致可以分为两类:Qt Widgets Application  和 Qt Quick Application.下面分别介绍这两类exe ...

  10. 【C#】数据库备份及还原的实现代码【转载】

    [转载]http://www.codesky.net/article/200908/128600.html C#数据库备份及还原1.在用户的配置时,我们需要列出当前局域网内所有的数据库服务器,并且要列 ...