Code Monkey home page Code Monkey logo

Comments (6)

JonathanHenson avatar JonathanHenson commented on June 3, 2024

Those samples have been touched in months. I'd just disable them and
rebuild. I'll have a look when I get to the office.
On Sep 14, 2015 6:11 AM, "Bruno Le Hyaric" [email protected] wrote:

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, std::__1::allocator > const&)", referenced from:
HandleLoginCommand(std::__1::unique_ptr<Aws::Example1::PlayerData, std::__1::default_deleteAws::Example1::PlayerData >&, std::__1::unique_ptr<Aws::DynamoDB::DynamoDBClient, std::__1::default_deleteAws::DynamoDB::DynamoDBClient >&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in Main.cpp.o
"Aws::Utils::Logging::DefaultLogSystem::DefaultLogSystem(Aws::Utils::Logging::LogLevel, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
std::__1::shared_ptrAws::Utils::Logging::DefaultLogSystem std::__1::shared_ptrAws::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, std::_1::allocator > 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, std::__1::allocator > const&)", referenced from:
Aws::Example1::DynamoDBDataRowBase::WriteToDb(std::__1::unique_ptr<Aws::DynamoDB::DynamoDBClient, std::__1::default_deleteAws::DynamoDB::DynamoDBClient > const&) in DynamoDbDataRow.cpp.o
Aws::Example1::DynamoDBDataRowBase::ReadFromDb(std::__1::unique_ptr<Aws::DynamoDB::DynamoDBClient, std::_1::default_deleteAws::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, std::__1::allocator > const&)

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

Aws::Auth::ProfileConfigFileAWSCredentialsProvider::GetAccountIdForProfile(std::__1::basic_string<char, std::__1::char_traits, Aws::Allocator > 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.


Reply to this email directly or view it on GitHub
#12.

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 3, 2024

It looks like when the sample is building, the macro
-DAWS_CUSTOM_MEMORY_MANAGEMENT is not defined.
On Sep 14, 2015 6:11 AM, "Bruno Le Hyaric" [email protected] wrote:

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, std::__1::allocator > const&)", referenced from:
HandleLoginCommand(std::__1::unique_ptr<Aws::Example1::PlayerData, std::__1::default_deleteAws::Example1::PlayerData >&, std::__1::unique_ptr<Aws::DynamoDB::DynamoDBClient, std::__1::default_deleteAws::DynamoDB::DynamoDBClient >&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in Main.cpp.o
"Aws::Utils::Logging::DefaultLogSystem::DefaultLogSystem(Aws::Utils::Logging::LogLevel, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
std::__1::shared_ptrAws::Utils::Logging::DefaultLogSystem std::__1::shared_ptrAws::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, std::_1::allocator > 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, std::__1::allocator > const&)", referenced from:
Aws::Example1::DynamoDBDataRowBase::WriteToDb(std::__1::unique_ptr<Aws::DynamoDB::DynamoDBClient, std::__1::default_deleteAws::DynamoDB::DynamoDBClient > const&) in DynamoDbDataRow.cpp.o
Aws::Example1::DynamoDBDataRowBase::ReadFromDb(std::__1::unique_ptr<Aws::DynamoDB::DynamoDBClient, std::_1::default_deleteAws::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, std::__1::allocator > const&)

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

Aws::Auth::ProfileConfigFileAWSCredentialsProvider::GetAccountIdForProfile(std::__1::basic_string<char, std::__1::char_traits, Aws::Allocator > 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.


Reply to this email directly or view it on GitHub
#12.

from aws-sdk-cpp.

bu2 avatar bu2 commented on June 3, 2024

Thanks Jonathan !

I have just added:

add_definitions(-DAWS_CUSTOM_MEMORY_MANAGEMENT)

in the CMakeLists.txt of the example project... and it build.

PS: definitely waiting for more examples :-)

Regards.

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 3, 2024

So, if you build it in the context of the entire project, (meaning add_subdirectory from the master cmake file), that will already be there. If you build it individually, or via your own build system, it will need to be added.

I would not add it to the cmake file in our repo, because it only uses that macro when custom memory management is enabled.

from aws-sdk-cpp.

JonathanHenson avatar JonathanHenson commented on June 3, 2024

With regards to further examples. The integration tests, can show you how to use the low-level SDKs as well as higher-level utilities such as the TransferManager.

That example, if I remember correctly, was us playing around with trying to implement something to the document model dynamodb apis similar to the C# and Java sdks.

from aws-sdk-cpp.

bu2 avatar bu2 commented on June 3, 2024

Ok I got it.

I just realised that the example is built with the build of the main SDK on Windows only (/CMakeLists.txt, line 153).

From my point of view you can close the issue.

Regards.

from aws-sdk-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.