question

Jaime Ruiz-Borau Vizarraga avatar image
Jaime Ruiz-Borau Vizarraga asked

What are the json cpp packages needed for the C++ SDK?

In this page of the documentation

https://docs.microsoft.com/es-es/gaming/playfab/sdks/xplatcpp/quickstart-windows

At some point it says this:

Right-click on the project in Solution Explorer, select Manage NuGet packages, and search for "playfab." You should see a small number of matches, and you're looking for: "com.playfab.xplatcppsdk.vXXX." Install the json cpp packages. Your project should now compile.

But when i search "playfab" in the search bos inside Manage NuGet packages, it does not appear any package named json cpp of any kind. Also with only "com.playfab.xplatcppsdk.vXXX" the solution does not compile, it needs some sort of json cpp files.

What should I do?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Hernando avatar image
Hernando answered

Thank you for your feedback, we can reproduce the Link error of CPP SDK.Now you can refer to the following steps as a temporary solution:

1.Download PlayFab Cross-Platform C++ SDK form Github, then Open this project in the VS, and compile for X86 platform.

2.Create a new C++ console project, and install package "com.playfab.xplatcppsdk.vXXX." by Nuget.

3.Right-click on a project node (not the top-level solution) and choose Properties, in the left pane of the Property Pages dialog box, select Configuration Properties > VC++ Directories. In this page, add the path to the directory where the Json cpp .lib file(lib_json.lib and lib_json.pdb) is located inLibrary Directories

4.In the Linker > Input property page, add the name of the .lib file(lib_json.lib) to Additional Dependencies.

5.Replace the contents of main function ref https://docs.microsoft.com/en-us/gaming/playfab/sdks/xplatcpp/quickstart-windows#set-up-your-first-api-call

6.Compile and click error output, locate to PlayFabJsonHeaders.h file inside nuget package folders, change

#include <json/json.h>

#include <json/reader.h>

#include <json/value.h>

to

#include <json.h>

#include <reader.h>

#include <value.h>

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jaime Ruiz-Borau Vizarraga avatar image Jaime Ruiz-Borau Vizarraga commented ·

And where do I get the lib_json.lib and lib_json.pdb files? I managed to get the lib_json.lib file but not the lib_json.pdb file.

0 Likes 0 ·
Hernando avatar image Hernando Jaime Ruiz-Borau Vizarraga commented ·
[YourFolderPath]\XPlatCppSdk\build\Windows\[Building
Platform]\Debug\lib_json.lib
[YourFolderPath]\XPlatCppSdk\build\Windows\[Building
Platform]\Debug\lib_json.pdb

If you compiled it before, they would appear in the address like the above.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.