我正在尝试构建 sdk 但无济于事。我的目标是按照此处的说明构建库的静态版本: How to statically link the CPP REST SDK,但我什至没有进入静态部分,项目的构建按原样失败。
这是我所做的:
- 克隆了回购
- 运行 setup_ps_env_VS2013.ps1 (不确定是否有必要)
- 使用VS2013 express打开casablanca120.desktop.sln
运行构建解决方案
编译似乎工作,但链接失败:错误 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.
任何想法我做错了什么?