UE5.1 Gamelift plugin won't compile

0

Hello! I'm trying to follow this tutorial: https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-engines-setup-unreal.html Ifollowed everything but visual studio 2022 won't compile. First error is: fatal error C1083: Cannot open include file: 'GameLiftServerSDK.h': No such file or directory

But I did copy it to plugin diretory. And added include directories in properties. Platform is Windows 64bit openssl version is OpenSSL-3_1_1, cmake version cmake-3.27.1, python-3.11.4 Please help! Errors go on:

1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(18): error C2065: 'NOT_SET': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(19): error C2065: 'ACCEPT_ALL': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(20): error C2065: 'DENY_ALL': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(17): error C2440: 'initializing': cannot convert from 'initializer list' to 'GAMELIFTSERVERSDK_API'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(17): note: The initializer contains too many elements
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(23): error C2086: 'GAMELIFTSERVERSDK_API EPlayerSessionCreationPolicy': redefinition
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(16): note: see declaration of 'EPlayerSessionCreationPolicy'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(23): error C2146: syntax error: missing ';' before identifier 'GetPlayerSessionCreationPolicyForName'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(24): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(26): error C2510: 'EPlayerSessionCreationPolicy': left of '::' must be a class/struct/union
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(26): error C2065: 'ACCEPT_ALL': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(29): error C2510: 'EPlayerSessionCreationPolicy': left of '::' must be a class/struct/union
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(29): error C2065: 'DENY_ALL': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(31): error C2510: 'EPlayerSessionCreationPolicy': left of '::' must be a class/struct/union
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(31): error C2065: 'NOT_SET': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(34): error C2146: syntax error: missing ';' before identifier 'GetNameForPlayerSessionCreationPolicy'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(34): error C2146: syntax error: missing ')' before identifier 'value'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(35): error C2143: syntax error: missing ';' before '{'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(35): error C2447: '{': missing function header (old-style formal list?)
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(48): error C2065: 'NOT_SET': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(49): error C2065: 'RESERVED': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(50): error C2065: 'ACTIVE': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(51): error C2065: 'COMPLETED': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(52): error C2065: 'TIMEDOUT': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(47): error C2440: 'initializing': cannot convert from 'initializer list' to 'GAMELIFTSERVERSDK_API'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(47): note: The initializer contains too many elements
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(55): error C2086: 'GAMELIFTSERVERSDK_API EPlayerSessionStatus': redefinition
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(46): note: see declaration of 'EPlayerSessionStatus'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(55): error C2146: syntax error: missing ';' before identifier 'GetPlayerSessionStatusForName'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(55): error C2065: 'name': undeclared identifier
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(55): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(56): error C2059: syntax error: '{'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(56): error C2143: syntax error: missing ';' before '{'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(56): error C2447: '{': missing function header (old-style formal list?)
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(72): error C2086: 'GAMELIFTSERVERSDK_API FString': redefinition
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(34): note: see declaration of 'FString'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(72): error C2146: syntax error: missing ';' before identifier 'GetNameForPlayerSessionStatus'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(72): error C2146: syntax error: missing ')' before identifier 'value'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(73): error C2143: syntax error: missing ';' before '{'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(73): error C2447: '{': missing function header (old-style formal list?)
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(89): error C2011: 'GAMELIFTSERVERSDK_API': 'enum' type redefinition
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(16): note: see declaration of 'GAMELIFTSERVERSDK_API'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(90): error C2146: syntax error: missing ')' before identifier 'm_webSocketUrl'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(91): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(91): error C2371: 'FString': redefinition; different basic types
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(34): note: see declaration of 'FString'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(91): error C2146: syntax error: missing ';' before identifier 'm_fleetId'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(92): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(92): error C2371: 'FString': redefinition; different basic types
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(34): note: see declaration of 'FString'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(92): error C2146: syntax error: missing ';' before identifier 'm_processId'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(93): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(93): error C2371: 'FString': redefinition; different basic types
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(34): note: see declaration of 'FString'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(93): error C2146: syntax error: missing ';' before identifier 'm_hostId'
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(94): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(94): error C2371: 'FString': redefinition; different basic types
1>n:\UE_Source\RakocziCsata\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\GameLiftServerSDKModels.h(34): note: see declaration of 'FString

Muszti
asked a year ago379 views
1 Answer
0

Hi Muszti,

The only project you should need to compile using the Visual Studio Editor itself is the UE5.sln which builds the Unreal Development Editor.

Here's a general outline of what's elaborated in the doc to make sure you are doing things in the right ordering:

  1. For the C++ Server SDK, you can use cmake to build the SDK .dll/.lib files. This needs to happen on the C++ Server SDK bundle.
  2. Copy the built libraries over to the ThirdParty\GameLiftServerSDK\Win64 folder in your Unreal project.
  3. Create a folder called "Plugins" in the folder for the Unreal Project created in the previous step. Take the whole GameLiftServerSDK folder from the C++ Server SDK for plugin for Unreal and place it in the Plugins folder of your Unreal Project. This will allow the unreal project to see the plugin. If a Plugins folder doesn't exist, create one.
  4. Proceed with editing the .uproject file to list the GameLiftServerSDK plugin, and other steps outlined in the doc.

From the error logs (GameLiftServerSDKModels.h related) provided it seems like you may be attempting to build the Unreal Plugin bundle in Visual Studio. The Plugin is a just a wrapper over the C++ SDK and only meant to be used within Unreal Engine.

Hope this helps. Thanks!

AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions