aws-sdk-cpp: Symbol not found error while running my executable. Building sdk as external project
Confirm by changing [ ] to [x] below:
- [X ] I’ve gone though Developer Guide and API reference
- [ X] I’ve searched for previous similar issues and didn’t find any solution
Platform/OS/Hardware/Device What are you running the sdk on? MacOS 10.14
Describe the question I am adding CPP SDK as an external project. The configuration is as follows:
cmake_minimum_required(VERSION 2.8)
project(libawscpp-download NONE)
include(ExternalProject)
ExternalProject_Add(libawscpp-download
GIT_REPOSITORY https://github.com/aws/aws-sdk-cpp.git
GIT_TAG 1.8.17
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build
CMAKE_ARGS -DBUILD_ONLY=monitoring;logs -DENABLE_TESTING=OFF -DCUSTOM_MEMORY_MANAGEMENT=OFF
BUILD_ALWAYS TRUE
TEST_COMMAND ""
)
In my main CMake file, I run find_package(AWSSDK REQUIRED COMPONENTS monitoring logs) and while linking, I run I link with ${AWS_SDK_LINK_LIBRARIES}. Everything builds fine the target executable is generated. However, when I run the executable, I run into this issue:
dyld: lazy symbol binding failed: Symbol not found: __ZN3Aws6Region19ComputeSignerRegionERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS_9AllocatorIcEEEE
Referenced from: /usr/local/lib/libaws-cpp-sdk-logs.dylib
Expected in: /usr/local/lib/libaws-cpp-sdk-core.dylib
dyld: Symbol not found: __ZN3Aws6Region19ComputeSignerRegionERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS_9AllocatorIcEEEE
Referenced from: /usr/local/lib/libaws-cpp-sdk-logs.dylib
Expected in: /usr/local/lib/libaws-cpp-sdk-core.dylib
Abort trap: 6
I am unsure if I am messing something up, but does anyone have any experience adding CPP SDK as external project in the past?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (4 by maintainers)
Sure! I can do that.
Let me create a new PR. Thank you for your support!
@webbnh @KaibaLopez ,
Thank you for all your assistance. I found a similar issue, and this worked: https://github.com/aws/aws-sdk-cpp/issues/826
I would like to recommend that the team look into adding instructions on how to add the SDK as an external project. I think it will be really helpful since it can be quite a common way to add this project with External add. If the team welcomes contributions, I could add the section in the README.md as well. Let me know.