0
static const char* AWS_ACCESS_KEY_ID = "XXXXXXXXXXXXX";
static const char* AWS_SECRET_ACCESS_KEY = "YYYYYYYYYY";
AWSCredentials credentials(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY);

上面的代码incomplete type is not allowed在 Visual Studio 中给了我一个错误,并导致构建错误为use of undefined type 'Aws::Auth::AWSCredentials'

请指出构建 AWSCredentials 对象的正确方法?

4

1 回答 1

1

确保包含该类的头文件。还要确保您使用该类的完全限定名称Aws::Auth::AWSCredentials或在该变量的声明之前使用using语句using namespace Aws::Auth;

于 2017-06-17T05:08:43.520 回答