Ubuntu环境安装AWS GameKit遇S3Client构造函数匹配错误
在EC2 Ubuntu实例构建AWS GameKit时遇到S3Client构造函数匹配错误
我在EC2 Ubuntu实例上安装AWS GameKit(仓库主分支),已按需修改代码和安装步骤,但构建时始终报错:找不到匹配的Aws::S3::S3Client::S3Client(Aws::Auth::AWSCredentials&, Aws::Client::ClientConfiguration&)构造函数。
以下是default_clients.h中的代码块:
class DefaultClients { private: template <class T> static inline T* getDefaultClient(const AccountCredentialsCopy& credentials) { Aws::Client::ClientConfiguration clientConfig; Aws::Auth::AWSCredentials creds; clientConfig.region = credentials.region.c_str(); creds.SetAWSAccessKeyId(credentials.accessKey.c_str()); creds.SetAWSSecretKey(credentials.accessSecret.c_str()); return new T(creds, clientConfig); } public: static inline Aws::S3::S3Client* GetDefaultS3Client(const AccountCredentialsCopy& credentials) { return getDefaultClient<Aws::S3::S3Client>(credentials); }
终端构建输出如下:
INFO:root:Running command: ['make'] from directory: /home/red/development/gamekit-ubuntu/aws-gamekit In file included from /home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/include/aws/gamekit/core/utils/sts_utils.h:13, from /home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/source/aws/gamekit/core/utils/sts_utils.cpp:5, from /home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/CMakeFiles/aws-gamekit-core.dir/Unity/unity_2_cxx.cxx:3: /home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/include/aws/gamekit/core/awsclients/default_clients.h: In instantiation of ‘static T* GameKit::DefaultClients::getDefaultClient(const GameKit::AccountCredentialsCopy&) [with T = Aws::S3::S3Client]’: /home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/include/aws/gamekit/core/awsclients/default_clients.h:52:55: required from here /home/red/development/gamekit-ubuntu/aws-gamekit/aws-gamekit-core/include/aws/gamekit/core/awsclients/default_clients.h:46:20: error: no matching function for call to ‘Aws::S3::S3Client::S3Client(Aws::Auth::AWSCredentials&, Aws::Client::ClientConfiguration&)’ 46 | return new T(creds, clientConfig); | ^~~~~~~~~~~~~~~~~~~~~~~~~~
我怀疑是API调用方式有误或版本不匹配。
内容的提问来源于stack exchange,提问作者RED
相关产品推荐
相关产品推荐

