The GameLift preprocessors are the same in profile and profile_deidcated configs in Visual Studio

Hi dev team,

I have a server/client implementation that the codes are separated by the preprocessors. I switch between different implementations by profile and profile_dedicated config inside Visual Studio but there is no difference between GameLift preprocessors in different configs. In both cases, the

BUILD_GAMELIFT_CLIENT

has been set in my project.

It is expected that the

BUILD_GAMELIFT_SERVER

is set to profile_dedicated mode.

This can disrupt the server’s implementation because Visual Studio lets you use client-side-only functions of the GameLift in the dedicated-server codes.

Lumberyard 1.18

Visual Studio 2017

I figured it out! you can define BUILD_GAMELIFT_SERVER in all dedicated configs by changing this file:

Lumberyard\1.18\dev\Tools\build\waf-1.7.13\lmbrwaflib\compile_settings_dedicated.py

just replace

v['DEFINES'] += [ 'DEDICATED_SERVER']

with

v['DEFINES'] += [ 'DEDICATED_SERVER', 'BUILD_GAMELIFT_SERVER' ]

then rebuild the dedicated server and recreate Visual Studio solution.

I’m not sure if this is the right way, but it works for me :slight_smile: