【问题标题】:Building the cpprest (Casablanca) on windows 8.1 using VS2013 express使用 VS2013 express 在 windows 8.1 上构建 cpprest (Casablanca)
【发布时间】:2014-11-16 09:02:53
【问题描述】:

我正在尝试构建 sdk,但无济于事。 我的目标是按照此处的说明构建库的静态版本: How to statically link the CPP REST SDK,但我什至还没有进入静态部分,项目的构建失败了。

这就是我所做的:

  1. 克隆the repo
  2. 运行 setup_ps_env_VS2013.ps1(不确定是否有必要)
  3. 使用 VS2013 express 打开 casablanca120.desktop.sln
  4. 运行构建解决方案
    编译似乎工作,但链接失败:

    错误 LNK1104:无法打开文件 'MY_WORSPACE\cpprest\Binaries\Win32\Debug\cpprest120d_xp_2_2.lib'
    MY_WORSPACE\cpprest\Release\samples\BingRequest\BingRequest120.xp\LINK BingRequest120.xp

我根本不想为 XP 构建它,所以我尝试了同样的方法,但使用 casablanca120.WinRT.sln 解决方案,当我尝试构建时,我得到了:

MY_WORSPACE\cpprest2\Release\src\build\casablanca120.winrt.vcxproj : error  : Unable to read the project file "casablanca120.winrt.vcxproj".
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(1809,3): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

MY_WORSPACE\cpprest2\Release\src\build\casablanca120.wp81.vcxproj : error  : Unable to read the project file "casablanca120.wp81.vcxproj".
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(1809,3): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

MY_WORSPACE\cpprest2\Release\samples\BlackJack\BlackJack_UIClient\BlackJack_UIClient120.vcxproj : error  : Unable to read the project file "BlackJack_UIClient120.vcxproj".
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(1809,3): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

MY_WORSPACE\cpprest2\Release\samples\FacebookDemo\FacebookDemo120.vcxproj : error  : Unable to read the project file "FacebookDemo120.vcxproj".
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(1809,3): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

MY_WORSPACE\cpprest2\Release\samples\WindowsLiveAuth\WindowsLiveAuth120.vcxproj : error  : Unable to read the project file "WindowsLiveAuth120.vcxproj".
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(1809,3): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\Microsoft.Windows.UI.Xaml.Cpp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

任何想法我做错了什么?

【问题讨论】:

  • 如果您从 NuGet 安装 Casablanca,您将获得静态库,因此您可能不必构建。此外,未能构建的项目是示例,因此它们是否构建可能并不重要 - 只需构建实际的 Casablanca 项目,因为这就是您所追求的。
  • 感谢@Pawel,据我所知,NuGet 没有静态版本的库。我还发布了the question on codeplex 并收到了答复。
  • 我确实错了静态库是 NuGet 包的一部分。我这个你应该发布到codeplex线程的链接作为答案并将其标记为答案。

标签: c++ rest http visual-studio-2013 casablanca


【解决方案1】:

如果您遇到同样的问题或类似问题,请尝试我在 CodePlex 论坛上得到的答案:

Building the sdk on windows 8.1 using VS2013 express (on CodePlex)

【讨论】:

    猜你喜欢
    • 2018-05-18
    • 1970-01-01
    • 2014-05-22
    • 1970-01-01
    • 2013-11-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多