question

tomgeorgin avatar image
tomgeorgin asked

Unreal Engine 4 Plugin does not compile for certain platforms (Monolithic header includes)

Hello,

I integrated the Plugin into UE4.18 (custom engine build though),

Our farm build for many platforms just to keep the code as clean as possible, and the build failed on LINUX because of PlayFab.

Indeed, many files include "Json.h" directly which is not allowed if there are certain flags set like prevent Monolithic Headers from being included directly.

I made all the necessary changes to fix compilation, is it something you'd be interested in seeing in a pull request on the GitHub?

Thank you for your time.

Best regards,
Tom

unreal
10 |1200

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

tomgeorgin avatar image
tomgeorgin answered

Hello,

For the compilation that failed because of Monolithic Headers includes, this is what was used:

clang 3.8.1 compiler with the following arguments:

clang++-3.8 -pipe -Wall -Werror -funwind-tables -Wsequence-point -Wdelete-non-virtual-dtor -fno-math-errno -fno-rtti -Wno-unused-private-field -Wno-tautological-compare -Wno-undefined-bool-conversion -Wno-unused-local-typedef -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-constant-logical-operand -Wno-unused-variable -Wno-unused-function -Wno-switch -Wno-unknown-pragmas -Wno-invalid-offsetof -Wno-gnu-string-literal-operator-template -Wshadow -Wno-error=shadow -Wundef -Wno-error=undef -gdwarf-3 -O2 -fPIC -ftls-model=local-dynamic -fexceptions -std=c++14 -nostdinc++

I had to fix the following headers:

PlayFabPrivate.h // Engine.h, CoreUObject.h, Json.h are all 3 monolithic

PlayFabJsonHelpers.cpp

PlayFabJsonObject.h
PlayFabJsonObject.cpp
PlayFabJsonValue.h PlayFabJsonValue.cpp

PlayFabCppBaseMode.h
PlayFabCppBaseModel.cpp

PlayFabResultHandler.cpp
PlayFabAdminAPI.cpp
PlayFabAuthentificationAPI.cpp
PlayFabBaseModel.cpp
PlayFabClientAPI.cpp
PlayFabCloudScriptAPI.cpp PlayFabDataAPI.cpp
PlayFabEventsAPI.cpp
PlayFabGroupsAPI.cpp PlayFabLocalizationAPI.cpp
PlayFabMatchmakerAPI.cpp PlayFabMultiplayerAPI.cpp
PlayFabProfilesAPI.cpp
PlayFabServerAPI.cpp

I think that's about it.

Thank you, have a good day.

Best regards,
Tom GEORGIN

10 |1200

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

Hernando avatar image
Hernando answered

Thank you for your feedback. Since it is a public repository, we welcome everyone to send a pull request. And we will inform the relevant team to review. Of course, you can also directly describe the steps to reproduce in the forum, which will help us to reproduce and file it.

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.

Lewis Mohr avatar image Lewis Mohr commented ·

We are seeing a bunch of compile warnings for this, but it's not failing our compile currently. It appears to be caused by installing the PlayFab plugin as an Engine plugin instead of a project plugin.

0 Likes 0 ·
tomgeorgin avatar image tomgeorgin Lewis Mohr commented ·

It's in the Engine for me, yes.

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.