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

The above code gives me an error of incomplete type is not allowed in visual studio and results ina build error as use of undefined type 'Aws::Auth::AWSCredentials'

Please point me to correct way to construct a AWSCredentials object ?

bawejakunal
  • 1,678
  • 2
  • 25
  • 54

2 Answers2

1

Make sure you include the header file of that class. Also make sure you either use the fully qualified name of that class Aws::Auth::AWSCredentials or precede the declaration of that variable with a using statement using namespace Aws::Auth;

Marco M.
  • 2,956
  • 2
  • 29
  • 22
0

Old question, but for those that still want to know:

I found the AWSCredentials class under aws/core/auth/AWSCredentialsProvider.h.

And as Marco said, you have to use Aws::Auth::AWSCredentials.

DaedalusAlpha
  • 1,610
  • 4
  • 20
  • 33