azure-storage-cpp: undefined reference to `azure::storage::cloud_blob_client::get_container_reference(std::string)

Hello,

I have built the library but am having a trouble when trying to use any function that takes a string_t. I’m getting:

testCpp/d5xdhpiaz0ugo43hs4g0p9nsf/main.o: In function `main':
src/main/test/main.cpp:274: undefined reference to `azure::storage::cloud_storage_account::parse(std::string const&)'
src/main/test/main.cpp:278: undefined reference to `azure::storage::cloud_blob_client::get_container_reference(std::string) const'
src/main/test/main.cpp:288: undefined reference to `azure::storage::cloud_blob_container::get_block_blob_reference(std::string) const'

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Ok, managed to solve this by importing Azure Storage CMake module from https://github.com/Azure-Samples/storage-blob-cpp-getting-started/tree/master/storage-blob-cpp-getting-started/cmake/Modules.

And then used it in my CMakeLists.txt:

find_package(AzureStorage REQUIRED)

include_directories(
  ${AZURESTORAGE_INCLUDE_DIR}
  ${catkin_INCLUDE_DIRS}
  ${Boost_INCLUDE_DIRS}
)

target_link_libraries(${PROJECT_NAME}
  ${AZURESTORAGE_LIBRARIES}
  ${catkin_LIBRARIES}
  ${Boost_LIBRARIES}
  ${CPPREST_LIB}
  OpenSSL::SSL
)