How can I use GameLiftServerSDK not using STL for UE4?

Hi all

I followed instructions to build GameLiftServerSDK for UE4 and referred to this sample using STL to figure out a way to use the SDK. However, After building UE4 with the SDK, I realized that if I don’t define “GAMELIFT_USE_STD” as a preprocessor, Gomoku sample is not useful for me because I don’t have an idea to apply it without STL to my project.

The code below, is a snippet of the SDK not using STL.

ProcessParameters( StartGameSessionFn onStartGameSession, void* startGameSessionState, UpdateGameSessionFn onUpdateGameSession, void* updateGameSessionState, ProcessTerminateFn onProcessTerminate, void* processTerminateState, HealthCheckFn onHealthCheck, void* healthCheckState, int port, const Aws::GameLift::Server::LogParameters logParameters)

The code below, shows how to initialize “ProcessParameters” using STL.

auto processReadyParameter = Aws::GameLift::Server::ProcessParameters( std::bind(&GameLiftManager::OnStartGameSession, this, std::placeholders::_1), std::bind(&GameLiftManager::OnProcessTerminate, this), std::bind(&GameLiftManager::OnHealthCheck, this), listenPort, Aws::GameLift::Server::LogParameters(logPaths));

My question is how can I initialize “ProcessParameters” not using STL as the code above using STL. Could you give a snippet of how to do that?

Anything is appreciated

Thanks RoundCat

After reading your answer, something popped up on my mind and I’m building GameLiftServerSDK again. If I have a problem again, let me ask you.

Hi @mskiller2000,

To clarify, you built the SDK using “DGAMELIFT_USE_STD=0”, correct? Because the default will build with STL support.

What is your goal here - to run the sample on a non-STL version of the GameLiftServerSDK, or just to run the sample? It would be easier to build with STL support just to run the sample.

If you need to run it without STL, you will have to change more than just the ProcessReady call to work without STL.

Now everything is okay because I built UE4 with GameLiftServerSDK without “-DBUILD_FOR_UNREAL=1” flag.

Thank you very much RoundCat