I am unable to link and compile the AWS SDK with the following link error:
/usr/bin/ld: CMakeFiles/ns_api.dir/src/main.cpp.o: undefined
reference to symbol '_ZN3Aws4FreeEPv'
/usr/bin/ld: //deps/aws_sdk/aws-cpp-sdk-core/libaws-cpp-sdk-
core.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ns_api.dir/build.make:95: ns_api] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/ns_api.dir/all]
Error 2
make: *** [Makefile:84: all] Error 2
Additionally, it seems that I need to specify the build directory with aws-sdk-cpp_DIR
even though I did a make install
- should this not have placed the lib in the systems lib dir?
I installed the package as follows:
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING="FALSE" -DBUILD_ONLY="s3" . && make install -j8
I am under the impression that this issue should not be present given I following the install instructions exactly within an isolated ubuntu environment
Please advise
Thank you very much!
Wanted to follow up here with my own answer:
target_link_libraries( ... aws-cpp-sdk-core aws-cpp-sdk-s3 ... )
was required in my cmake file
adding the core lib for the linker was not required in other installations, so this a ton of caused confusion on my end.