You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I used the built library file, using the official example, there were two link errors
Severity Code Description Item File line Does not display status details Error LNK2001 cannot resolve external symbols "char const * const Aws::Http::CONTENT TYPE HEADER" (? CONTENT TYPE HEADER@Http@Aws@@3QBDB) AWSTest D:\C++\AWSTest\main.obj 1
Severity Code Description Item File line Prohibited from displaying status details Error LNK2001 failed to parse external symbols "char const * const Aws::Http::API VERSION HEADER" (? API VERSION HEADER@Http@Aws@@3QBDB) AWSTest D:\C++\AWSTest\main.obj 1
Regression Issue
Select this option if this issue appears to be a regression.
Expected Behavior
No Error
Current Behavior
Error LNK2001 External symbols that cannot be resolved "char const * const Aws::Http::CONTENT_TYPE_HEADER" (?CONTENT_TYPE_HEADER@Http@Aws@@3QBDB) AWSTest D:\C++\AWSTest\main.obj 1
Error LNK2001 External symbols that cannot be resolved "char const * const Aws::Http::API_VERSION_HEADER" (?API_VERSION_HEADER@Http@Aws@@3QBDB) AWSTest D:\C++\AWSTest\main.obj 1
A "Hello Autoscaling" starter application which initializes an Amazon EC2 Auto Scaling client and describes the
Amazon EC2 Auto Scaling groups.
main function
Usage: 'hello_autoscaling'
*/
int main(int argc, char** argv)
{
Aws::SDKOptions options;
// Optionally change the log level for debugging.
options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Debug;
Aws::InitAPI(options); // Should only be called once.
int result = 0;
{
Aws::Client::ClientConfiguration clientConfig;
//Optional: Set to the AWS Region (overrides config file).
clientConfig.region = "us-east-1";
Aws::AutoScaling::AutoScalingClient autoscalingClient(clientConfig);
std::vector<Aws::String> groupNames;
Aws::String nextToken; // Used for pagination.
do {
Aws::AutoScaling::Model::DescribeAutoScalingGroupsRequest request;
if (!nextToken.empty())
{
request.SetNextToken(nextToken);
}
Aws::AutoScaling::Model::DescribeAutoScalingGroupsOutcome outcome =
autoscalingClient.DescribeAutoScalingGroups(request);
if (outcome.IsSuccess())
{
const Aws::Vector<Aws::AutoScaling::Model::AutoScalingGroup>& autoScalingGroups =
outcome.GetResult().GetAutoScalingGroups();
for (auto& group : autoScalingGroups) {
groupNames.push_back(group.GetAutoScalingGroupName());
}
nextToken = outcome.GetResult().GetNextToken();
}
else
{
std::cerr << "Error with AutoScaling::DescribeAutoScalingGroups. "
<< outcome.GetError().GetMessage()
<< std::endl;
result = 1;
break;
}
} while (!nextToken.empty());
std::cout << "Found " << groupNames.size() << " AutoScaling groups." << std::endl;
for (auto& groupName : groupNames)
{
std::cout << "AutoScaling group: " << groupName << std::endl;
}
}
Aws::ShutdownAPI(options); // Should only be called once.
//return result;
}
`
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
1.11.455
Compiler and Version used
Visual Studio
Operating System and version
Windows 11 22631.4460
The text was updated successfully, but these errors were encountered:
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
guoyuanchao94
changed the title
LNK2001 External symbols that cannot be resolved "char const * const Aws::Http::CONTENT_TYPE_HEADER" (?CONTENT_TYPE_HEADER@Http@Aws@@3QBDB)
LNK2001 About Aws::Http::CONTENT_TYPE_HEADER and Aws::Http::CONTENT TYPE HEADER
Nov 28, 2024
Describe the bug
When I used the built library file, using the official example, there were two link errors
Severity Code Description Item File line Does not display status details Error LNK2001 cannot resolve external symbols "char const * const Aws::Http::CONTENT TYPE HEADER" (? CONTENT TYPE HEADER@Http@Aws@@3QBDB) AWSTest D:\C++\AWSTest\main.obj 1
Severity Code Description Item File line Prohibited from displaying status details Error LNK2001 failed to parse external symbols "char const * const Aws::Http::API VERSION HEADER" (? API VERSION HEADER@Http@Aws@@3QBDB) AWSTest D:\C++\AWSTest\main.obj 1
Regression Issue
Expected Behavior
No Error
Current Behavior
Error LNK2001 External symbols that cannot be resolved "char const * const Aws::Http::CONTENT_TYPE_HEADER" (?CONTENT_TYPE_HEADER@Http@Aws@@3QBDB) AWSTest D:\C++\AWSTest\main.obj 1
Error LNK2001 External symbols that cannot be resolved "char const * const Aws::Http::API_VERSION_HEADER" (?API_VERSION_HEADER@Http@Aws@@3QBDB) AWSTest D:\C++\AWSTest\main.obj 1
Reproduction Steps
`#include <aws/core/Aws.h>
#include <aws/autoscaling/AutoScalingClient.h>
#include <aws/autoscaling/model/DescribeAutoScalingGroupsRequest.h>
#include
/*
*/
int main(int argc, char** argv)
{
Aws::SDKOptions options;
// Optionally change the log level for debugging.
options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Debug;
Aws::InitAPI(options); // Should only be called once.
int result = 0;
{
Aws::Client::ClientConfiguration clientConfig;
//Optional: Set to the AWS Region (overrides config file).
clientConfig.region = "us-east-1";
}
`
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
1.11.455
Compiler and Version used
Visual Studio
Operating System and version
Windows 11 22631.4460
The text was updated successfully, but these errors were encountered: