Unreal -- unable to package for linux on windows.

0

In AttributeValue.h, line 309 and line 320,

m_key[MAX_STRING_LENGTH] = '\0';

m_key is a value with Type AttributeStringType. AttributeStringTypeis defined as

typedef char AttributeStringType[MAX_STRING_LENGTH];

When I compile developer Server for linux. there is an error

SeverityCodeDescriptionProjectFileLineSuppression State
Errorarray index 101 is past the end of the array (which contains 101 elements) [-Werror,-Warray-bounds]projectname projectname\Plugins\GameLiftServerSDK\Source\GameLiftServerSDK\Public\aws\gamelift\server\model\AttributeValue.h309

How can I solve this problem? Plz help me. Sorry, my English is very bad.

已提问 5 年前246 查看次数
3 回答
0

Hey there, sorry that you are running into trouble here. This looks like a bug we are currently aware of on our end - looking to include the fix for it in our next SDK release. In the meantime, could you try adding "-1" after "MAX_STRING_LENGTH" to see if that helps? For example, code for m_key should look like:

m_key[MAX_STRING_LENGTH - 1] = '\0';
已回答 5 年前
0

Do you know when the next SDK release is?

已回答 5 年前
0

I'm getting the same issue which is preventing me from building my UE4 game's dedicated server for LinuxServer while on Windows.

C:/Genesis/Krieg 4.20/Plugins/GameLiftServerSDK/Source/GameLiftServerSDK/Public\aws/gamelift/server/model/AttributeValue.h(309,13): error: array index 101 is past the end of the array (which contains 101 elements) [-Werror,-Warray-bounds]

Also getting these errors:


    C:/Genesis/Krieg 4.20/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public\aws/gamelift/GameLiftErrors.h(74,3): error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
C:/Genesis/Krieg 4.20/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public\aws/gamelift/model/AcceptMatchResult.h(35,25): error: expected ';' after top level declarator
C:/Genesis/Krieg 4.20/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public\aws/gamelift/model/Alias.h(46,9): error: redefinition of 'dllimport'
class AWS_GAMELIFT_API Alias
^
C:/Genesis/Krieg 4.20/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public\aws/gamelift/GameLift_EXPORTS.h(38,41): note: expanded from macro 'AWS_GAMELIFT_API'
#define AWS_GAMELIFT_API __declspec(dllimport)
^
C:/Genesis/Krieg 4.20/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public\aws/gamelift/model/RoutingStrategy.h(58,9): note: previous definition is here
class AWS_GAMELIFT_API RoutingStrategy
^
C:/Genesis/Krieg 4.20/Plugins/GameLiftClientSDK/Source/GameLiftClientSDK/Public\aws/gamelift/GameLift_EXPORTS.h(38,41): note: expanded from macro 'AWS_GAMELIFT_API'
#define AWS_GAMELIFT_API __declspec(dllimport)

已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则