Skip to content

aws-cpp-sdk-example1 broken ? #12

Closed
@bu2

Description

@bu2

Hi,

I can't wait to build some C++ tools with your sdk, but right now I fail to build the example:

I am building on OS X Yosemite, with CMake (3.3.1) and Clang (Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn).

And I get undefined symbols from the linker:

$ CPLUS_INCLUDE_PATH="../../aws-cpp-sdk-core/include:../../aws-cpp-sdk-dynamodb/include:../../aws-cpp-sdk-cognito-identity/include" LIBRARY_PATH="../../build/aws-cpp-sdk-core:../../build/aws-cpp-sdk-dynamodb:../../build/aws-cpp-sdk-cognito-identity"  make
[ 16%] Linking CXX executable runExample1
Undefined symbols for architecture x86_64:
  "Aws::Auth::ProfileConfigFileAWSCredentialsProvider::GetAccountIdForProfile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      HandleLoginCommand(std::__1::unique_ptr<Aws::Example1::PlayerData, std::__1::default_delete<Aws::Example1::PlayerData> >&, std::__1::unique_ptr<Aws::DynamoDB::DynamoDBClient, std::__1::default_delete<Aws::DynamoDB::DynamoDBClient> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in Main.cpp.o
  "Aws::Utils::Logging::DefaultLogSystem::DefaultLogSystem(Aws::Utils::Logging::LogLevel, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      std::__1::shared_ptr<Aws::Utils::Logging::DefaultLogSystem> std::__1::shared_ptr<Aws::Utils::Logging::DefaultLogSystem>::make_shared<Aws::Utils::Logging::LogLevel, char const (&) [18]>(Aws::Utils::Logging::LogLevel&&, char const (&&&) [18]) in Main.cpp.o
  "Aws::DynamoDB::Model::AttributeValue::SetN(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      Aws::Example1::AttributeBindingBase::SetAttribute(void const*, Aws::DynamoDB::Model::AttributeValue&) const in PlayerData.cpp.o
  "Aws::DynamoDB::Model::AttributeValue::SetS(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      Aws::Example1::DynamoDBDataRowBase::WriteToDb(std::__1::unique_ptr<Aws::DynamoDB::DynamoDBClient, std::__1::default_delete<Aws::DynamoDB::DynamoDBClient> > const&) in DynamoDbDataRow.cpp.o
      Aws::Example1::DynamoDBDataRowBase::ReadFromDb(std::__1::unique_ptr<Aws::DynamoDB::DynamoDBClient, std::__1::default_delete<Aws::DynamoDB::DynamoDBClient> > const&) in DynamoDbDataRow.cpp.o
      Aws::Example1::AttributeBindingBase::SetAttribute(void const*, Aws::DynamoDB::Model::AttributeValue&) const in PlayerData.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [runExample1] Error 1
make[1]: *** [CMakeFiles/runExample1.dir/all] Error 2
make: *** [all] Error 2

It seems there is a little mismatch between version of the example and version of the SDK where, I believe, the code has been refactored to support custom memory allocator:

  • Example for the first error:

The linker is looking for:

Aws::Auth::ProfileConfigFileAWSCredentialsProvider::GetAccountIdForProfile(std::__1::basic_string<char, std::__1::char_traits<char>, **std::__1::allocator<char> > const&**)

But libaws-cpp-sdk-core.dylib defines:

Aws::Auth::ProfileConfigFileAWSCredentialsProvider::GetAccountIdForProfile(std::__1::basic_string<char, std::__1::char_traits<char>, Aws::Allocator<char> > const&)

I hope to be able to provide a fix soon, by the way is there any roadmap for aws-cpp-sdk-samples ?

Best regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions