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);


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

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

最佳答案

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

07-24 09:38