question

mattbchapman avatar image
mattbchapman asked

Including Headers from the UE4 C++ SDK Plugin

I'm just starting out with PlayFab with this project and I'm trying to include a header from the UE4 SDK plugin to do a simple client login via Steam (which is working fine) auth token.

I've got this, which works fine:

#include "../../Plugins/PlayFab/Source/PlayFab/Public/PlayFab.h"

However, the following complains:

#include "../../Plugins/PlayFab/Source/PlayFab/Public/Core/PlayFabClientAPI.h"

Saying, "../../Plugins/PlayFab/Source/PlayFab/Public/Core/PlayFabClientAPI.h(4): fatal error C1083: Cannot open include file: 'Core/PlayFabError.h': No such file or directory"

I've tried adding the plugin relative and absolute folders to my project's include project properties to no avail. I guess the UBT doesn't really use the project's settings... How do I get this working?

Thanks.

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

·
mattbchapman avatar image
mattbchapman answered

After some more playing around (and to answer my own question...)

PrivateIncludePaths.AddRange( new string[] { "..\\Plugins\\PlayFab\\Source\\PlayFab\\Public" } );

In the build.cs file and

#define PLAYFAB_API

before the include makes it compile... this does not look the correct way to do this. *wonder*

10 |1200

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

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.