Asking about errors after building UE4 supporting PS4 with GameLiftServerSDK

0

Hi everyone

I'm building UE4 supporting PS4 with GameLiftServerSDK but I got an error below.

Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\aws/gamelift/common/GameLiftErrors.h(13,9): error: unknown pragma ignored [-Werror,-Wunknown-pragmas] #pragma warning(disable:4996)

I have no idea why "#pragma warning(disable:4996)" is there. So I'm worried about commenting the sentence.

How can I fix the error?

Any help is appreciated.

질문됨 5년 전304회 조회
1개 답변
0

Two quick things:

  1. The GameLift server SDK is designed for integration with game servers that are hosted on GameLift. GameLift only targets Windows and Amazon Linux EC2 hosts currently, so not a surprise that you are seeing some compiler issues building for the PS4 as its not something built internally.

  2. Those pragma statements are mostly to avoid warnings on Visual Studio build chains due to https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996?view=vs-2019#unsafe-crt-library-functions where Microsoft is suggesting you use the secure versions of some CRT functions ie instead of strcpy use strcpy_s.

It should be safe to hide them behind platform defines or remove them as you see fit.

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠