YetiTech-Studios / UE4GameLiftClientSDK

Gamelift Client SDK for Unreal Engine 4.
MIT License
79 stars 41 forks source link

Modifying any cpp causes compile errors #29

Closed MajinSephiroth closed 4 years ago

MajinSephiroth commented 4 years ago

First off, thanks for the great plugin, has the barebones required to get anyone started right away with AWS GameLift.

I need to improve a bit on the functionality of the GameliftClientApi.cpp but every time I make any modification whatsoever to it (i.e. adding a random space in the file, save and compile) I will get a whole bunch of errors in

1>Using Visual Studio 2019 14.24.28314 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.24.28314) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10). 1>Building 5 actions with 8 processes... 1> [1/5] Module.GameLiftClientSDK.cpp 1>D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(12): error C2079: 'Credentials' uses undefined class 'Aws::Auth::AWSCredentials' 1>D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(26): error C3861: 'LOG_WARNING': identifier not found 1>D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(29): error C2027: use of undefined type 'Aws::Auth::AWSCredentials' 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Public\aws/gamelift/GameLiftClient.h(116): note: see declaration of 'Aws::Auth::AWSCredentials' 1>D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(30): error C2664: 'Aws::GameLift::GameLiftClient::GameLiftClient(const Aws::GameLift::GameLiftClient &)': cannot convert argument 1 from 'int' to 'const Aws::Auth::AWSCredentials &' 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(30): note: Reason: cannot convert from 'int' to 'const Aws::Auth::AWSCredentials' 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(30): note: use of undefined type 'Aws::Auth::AWSCredentials' 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Public\aws/gamelift/GameLiftClient.h(116): note: see declaration of 'Aws::Auth::AWSCredentials' 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Public\aws/gamelift/GameLiftClient.h(586): note: see declaration of 'Aws::GameLift::GameLiftClient::GameLiftClient' 1>D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(47): error C2027: use of undefined type 'UGameLiftCreateGameSession' 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Intermediate\Build\Win64\UE4Editor\Inc\GameLiftClientSDK\GameLiftClientObject.generated.h(14): note: see declaration of 'UGameLiftCreateGameSession' 1>D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(47): error C2660: 'UGameLiftClientObject::CreateGameSession': function does not take 2 arguments 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(44): note: see declaration of 'UGameLiftClientObject::CreateGameSession' 1>D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(48): error C2027: use of undefined type 'UGameLiftCreateGameSession' 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Intermediate\Build\Win64\UE4Editor\Inc\GameLiftClientSDK\GameLiftClientObject.generated.h(14): note: see declaration of 'UGameLiftCreateGameSession' 1>D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(57): error C2027: use of undefined type 'UGameLiftDescribeGameSession' 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Intermediate\Build\Win64\UE4Editor\Inc\GameLiftClientSDK\GameLiftClientObject.generated.h(12): note: see declaration of 'UGameLiftDescribeGameSession' 1>D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(58): error C2027: use of undefined type 'UGameLiftDescribeGameSession' 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Intermediate\Build\Win64\UE4Editor\Inc\GameLiftClientSDK\GameLiftClientObject.generated.h(12): note: see declaration of 'UGameLiftDescribeGameSession' 1>D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(67): error C2027: use of undefined type 'UGameLiftCreatePlayerSession' 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Intermediate\Build\Win64\UE4Editor\Inc\GameLiftClientSDK\GameLiftClientObject.generated.h(11): note: see declaration of 'UGameLiftCreatePlayerSession' 1>D:\Workspaces\Master\Plugins\GameLiftClientSDK\Source\GameLiftClientSDK\Private\GameLiftClientObject.cpp(68): error C2027: use of undefined type 'UGameLiftCreatePlayerSession' 1> D:\Workspaces\Master\Plugins\GameLiftClientSDK\Intermediate\Build\Win64\UE4Editor\Inc\GameLiftClientSDK\GameLiftClientObject.generated.h(11): note: see declaration of 'UGameLiftCreatePlayerSession' 1> [2/5] GameLiftClientApi.cpp 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command "D:\Source\UnrealEngine-R\Engine\Build\BatchFiles\Build.bat -Target="ShaderCompileWorker Win64 Development" -Target="MyProjectEditor Win64 Development -Project=\"D:\Workspaces\Master\MyProject.uproject\"" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.

The only way to fix this, is to revert the .cpp file back to the previous revision.

These errors also pop up if I change the GameLiftClientSDK.Build.cs to have bFasterWithoutUnity = true;

Tried getting rid of the Intermediates, Binaries, re-generating project files, nothing seems to work. Modifying the .h files does not have any of these issues, only the .cpp ones. I've tested making modifications only to one or the other (just adding a space to them).

Any idea what could be causing this?

MajinSephiroth commented 4 years ago

This seems to be an issue related to revisions with perforce, I took the plugin to a blank project, made modifications and re-imported the plugin to compile it just fine.

This error is definitively a fringe case.