0

I'm trying to build the sdk but to no avail. My goal is to build a static version of the library, following the instructions here: How to statically link the CPP REST SDK, but I haven't even got to the static part, the build fails on the project as is.

Here's what I did:

  1. cloned the repo
  2. ran setup_ps_env_VS2013.ps1 (not sure it's necessary)
  3. opened casablanca120.desktop.sln using VS2013 express
  4. ran Build Solution
    The compilation seems to work, but linking fails with:

    error LNK1104: cannot open file 'MY_WORSPACE\cpprest\Binaries\Win32\Debug\cpprest120d_xp_2_2.lib'
    MY_WORSPACE\cpprest\Release\samples\BingRequest\BingRequest120.xp\LINK BingRequest120.xp

I'm not trying to build it for XP at all, so I then tried the same but with the casablanca120.WinRT.sln solution, when I try to build that I get:

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.

Any ideas what I'm doing wrong?

Nitzan Tomer
  • 155,636
  • 47
  • 315
  • 299
  • If you install Casablanca from NuGet you will get the static lib so maybe you don't have to build. Also, the projects that fail to build are samples so it may not matter if they build or not just - just build the actual Casablanca project because this is what you are after. – Pawel Nov 28 '14 at 01:37
  • Thanks @Pawel, as far as I'm aware there isn't a static version of the lib with NuGet. I also posted [the question on codeplex](https://casablanca.codeplex.com/discussions/572156) and received an answer. – Nitzan Tomer Nov 30 '14 at 14:10
  • 1
    I was wrong about static lib being part of the NuGet package, indeed. I this you should post the link to the codeplex thread as an answer and mark it as an answer. – Pawel Dec 02 '14 at 05:04

1 Answers1

1

If you are facing the same problem, or something similar, try the answer I got at the CodePlex forums:

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

Nitzan Tomer
  • 155,636
  • 47
  • 315
  • 299