microsoft / xbox-live-api

This repo contains Microsoft Xbox Live Service API (XSAPI) that enables game developers to access Xbox Live. To get access to the Xbox Live service, you can join the Xbox Live Creators Program at https://aka.ms/xblcp, or apply to the ID@Xbox program at http://www.xbox.com/en-us/Developers/id
MIT License
337 stars 105 forks source link

Samples not compiling #94

Closed ManuelCota closed 7 years ago

ManuelCota commented 7 years ago


Hi everybody,
I don't know if this is the right place to report an issue, so let me know if I should turn to StackExchange instead.
In a nutshell, it looks like the project "Microsoft.Xbox.Services.140.UWP.Cpp.vcxproj" does not compile due to missing files (I was following the "CreatorsCppTestApp" sample - I got the DirectX part under control). The file that has the problem is "pch_common.h", and the missing files can be summarized with the following piece of code:

`

include <cpprest/http_client.h>

include <cpprest/filestream.h>

include <cpprest/http_listener.h>       // HTTP server

include <cpprest/json.h>       // JSON library

include <cpprest/uri.h>       // URI library

`

I just downloaded the zip file (I saw that there were some commits done about 6 hours ago) and retry. close but no cigar.
Any help is greatly appreciated!!!!

Manuel

jasonsandlin commented 7 years ago

I'll take a look at this and get back to you. If you are just looking for samples that use the Creators SDK, checkout https://github.com/Microsoft/xbox-live-samples/tree/master/Samples/CreatorsSDK

Be sure to do a --recursive when cloning, or do "git submodule update --init" after you clone to pull in the submodules.

ManuelCota commented 7 years ago


Hi JasonSandlin,
Thank you very much for your prompt response! You are right, the recursive option should be the path to follow. I just went to the cpprestsdk and downloaded the zip file, extracted the project and copy it to the External directory. Visual Studio now detects the cpprest namespace, and the header files are properly located.
It still doesn't compile, though, as I'm getting the following error:

Project "C:\Manuel\Personal\Windows10\XboxLiveSDK\xbox-live-api-master\External\cpprestsdk\Release\src\build\vs14.uwp\cpprestsdk140.uwp.static.vcxproj" could not be found.

Indeed, the referenced project is not there. There are two other projects whose names are rather close, but not quite. I'll proceed and check if I need to download another zip file.
Thank you very much for your help!!!

jasonsandlin commented 7 years ago

We made modifications on top cpprestsdk (including adding the static project) so you won't be able to just extract their zip.

If you go into C:\Manuel\Personal\Windows10\XboxLiveSDK\xbox-live-api-master and then run "git submodule update --init", then git should pull in the submodules including External\cpprestsdk. Does that work?

If you run "git status" it should be clean.
Here's an example of what it should say:

git submodule update --init Submodule path 'External/cpprestsdk': checked out '9cd389021a8952faee884586c7533551ea958f40' Submodule path 'InProgressSamples/Kits/DirectXTK': checked out '96d9ef1c4de19c8e6232ff10c0f73ce84d57ee03'

git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working tree clean

ManuelCota commented 7 years ago

Hi JasonSandlin,

Thank you very much for the help! Indeed, I'm a Git-Illiterate and that is why I had problems. Once I downloaded the source code recursively, I was able to compile the "Social" solution within the CreatorsCPPTestApp folder.

One thing I had to do is to change the Windows Target Platform version in the cpprestsdk140.uwp.static.vcxproj project: I was instructed (by the Creators Documentation) to download the latest Windows 10 SDK which is version 10.0.14393.0, and this project was still pointing to the previous SDK. That change did the trick. Of course, this change is just to make it work for my system - I'm a newbie so probably I'm missing some other important stuff.

Thanks Again!!! I really look forward to start testing!!!