Visual Studio 2010 Express,Windows SDK 7.1,CMake和64位 [英] Visual Studio 2010 Express, Windows SDK 7.1, CMake and 64 bit

查看:156
本文介绍了Visual Studio 2010 Express,Windows SDK 7.1,CMake和64位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了通过CMake生成Visual Studio 2010 Express 64位项目的问题。我首先安装了VS2010 Express,然后安装了Windows SDK 7.1,以便能够构建64位应用程序,然后尝试编译我的CMake项目。

I'm running into problems generating a Visual Studio 2010 Express 64 bit project through CMake. I installed VS2010 Express first, then the Windows SDK 7.1 in order to be able to build 64 bit apps and then tried to compile my CMake project.

我不记得2008 Express这么难,但是2010年我一次又一次失败。 2010默认情况下会搜索随附的7.0a SDK。快捷版本似乎提供了缩减的32位版本,该版本位于

I do not remember this to be that difficult with 2008 Express, but with 2010 I fail again and again. 2010 searches per default for 7.0a SDK which is shipped with it. The express version seems to ship a reduced 32 bit version, which is located under

.../Program Files(X86)/Microsoft SDKs/Windows/7.0a

默认情况下,Windows SDK 7.1 64位将安装在

Windows SDK 7.1 64bit will be installed per default under

.../Program Files/Microsoft SDKs/Windows/7.0

在VS 2010 Express中,可以根据每个项目映射更改平台SDK,如果这样做,继承的路径宏会意外地指向正确的SDK。现在的问题是,对于我自己在项目文件中搞混,CMake不满意。因此,它总是将Platform SDK条目重置为默认值,这将使Windows SDK指向7.0a,并导致抱怨缺少64位库。

In VS 2010 Express the platform SDK can be changed on a per-project-map basis and if I do so the inherited path macros surprisingly point to the correct SDK. The problem now is, that CMake is not happy about me screwing around in the project files by myself. Thus, it always resets the Platform SDK entry to the default value, which will make the Windows SDK point to 7.0a and result in complaints about missing 64 bit libs.

I现在看到两种解决方案:

I now see two possibilities to resolve this:


  • 找到一种将7.1 SDK真正集成到VS2010 Express中的方法,就像VS2008一样。 VS2008在Windows SDK条目中的注册表中搜索 CurrentInstallFolder标签,然后可以更改此条目以指向另一个SDK。

  • Find a way to really integrate the 7.1 SDK into VS2010 Express, just like with VS2008. VS2008 searches the registry for the tag 'CurrentInstallFolder' in the Windows SDKs entry, and you can change this entry to point to another SDK.

找到一种方法告诉CMake(2.8.1)在项目中设置正确的Platform SDK。尚无计划如何执行此操作...

Find a way to tell CMake (2.8.1) to set the correct Platform SDK in the project. No plan how to do this...

我将不胜感激。不幸的是,2010年在一定程度上是强制性的,我个人根本无法适应它。

I would appreciate any help. 2010 is somewhat mandatory unfortunately, I personally cannot get used to it at all...

推荐答案

好,更新到最新的CMake (2.8.12)解决了这一问题,CMake现在可以检测到7.1 SDK并将其设置在项目文件中。

Ok, updating to the latest CMake (2.8.12) resolved this, CMake now detects the 7.1 SDK and sets it in the project files.

编辑:可以通过以下方式在CMake文件中选择工具集: CMAKE_GENERATOR_TOOLSET标志

The toolset can be chosen in a CMake file via the CMAKE_GENERATOR_TOOLSET flag

这篇关于Visual Studio 2010 Express,Windows SDK 7.1,CMake和64位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆