azure-storage-cpp | Microsoft Azure Storage Client Library for C | Storage library
kandi X-RAY | azure-storage-cpp Summary
kandi X-RAY | azure-storage-cpp Summary
The Azure Storage Client Library for C++ allows you to build applications against Microsoft Azure Storage. For an overview of Azure Storage, see Introduction to Microsoft Azure Storage. There is an alternative client library that requires minimum dependency, which provides basic object storage that Blob service offers. Please see azure-storage-cpplite for more information.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of azure-storage-cpp
azure-storage-cpp Key Features
azure-storage-cpp Examples and Code Snippets
Community Discussions
Trending Discussions on azure-storage-cpp
QUESTION
If you build a library with conan and set compiler.cppstd
setting to e.g. 20
and call conan install
, the libraries are still built with the default standard for the given compiler.
The docs say:
The value of compiler.cppstd provided by the consumer is used by the build helpers:
- The CMake build helper will set the CONAN_CMAKE_CXX_STANDARD and CONAN_CMAKE_CXX_EXTENSIONS definitions that will be converted to the corresponding CMake variables to activate the standard automatically with the conan_basic_setup() macro.
So it looks like you need to call conan_basic_setup()
to activate this setting. But how do I call it? By patching a library's CMakeLists.txt? I sure don't want to do that just to have the proper standard version used. I can see some recipes that manually set the CMake definition based on the setting, e.g.:
- https://github.com/conan-io/conan-center-index/blob/master/recipes/folly/all/conanfile.py#L117
- https://github.com/conan-io/conan-center-index/blob/master/recipes/crc32c/all/conanfile.py#L58
- https://github.com/conan-io/conan-center-index/blob/master/recipes/azure-storage-cpp/all/conanfile.py#L71
- https://github.com/conan-io/conan-center-index/blob/master/recipes/caf/all/conanfile.py#L105
But this feels like a hack either. So what is the proper way to make sure libraries are built with the compiler.cppstd
I specified?
ANSWER
Answered 2022-Feb-17 at 14:15Avoid patching, it's ugly and fragile, for each new release you will need an update due upstream's changes.
The main approach is a CMakeLists.txt as wrapper, as real example: https://github.com/conan-io/conan-center-index/blob/5f77986125ee05c4833b0946589b03b751bf634a/recipes/proposal/all/CMakeLists.txt and there many others.
QUESTION
Have a small C++ app to test some Azure Blob Storage features with in Visual Studio 2019. Have followed the instructions here to install azure-storage-cpp sdk using vcpkg but when I try to run the app I get the following linker error:
AzureConsoleApp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: void __cdecl azure::storage::cloud_storage_account::initialize_default_endpoints(bool)" (__imp_?initialize_default_endpoints@cloud_storage_account@storage@azure@@AEAAX_N@Z) referenced in function "public: __cdecl azure::storage::cloud_storage_account::cloud_storage_account(class azure::storage::storage_credentials const &,bool)" (??0cloud_storage_account@storage@azure@@QEAA@AEBVstorage_credentials@12@_N@Z)
vcpkg reports the following as installed:
azure-storage-cpp:x64-windows-static 7.0.0
Microsoft Azure Storage Client SDK for C++ A cli...
I need to use the static release of azure-storage-cpp for the app hence the x64-windows-static.
From reading the vcpkg docs it's an install and forget type of tool with the tool itself stating:
All MSBuild C++ projects can now #include any installed libraries. Linking will be handled automatically. Installing new libraries will make them instantly available.
What have I missed?
...ANSWER
Answered 2020-Jan-09 at 14:04Need to define #define _NO_WASTORAGE_API before including azure storage sdk headers and manually include all the necessary azure storage SDK reference libraries (xmllite.lib, bcrypt.lib, rpcrt4.lib, Crypt32.lib, Winhttp.lib) in the linker input.
Found my answer here.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install azure-storage-cpp
To build with source code, there are three ways to install dependencies:.
Via vcpkg You can manage the dependencies with vcpkg, and use Visual Studio 2015 update 3 or Visual Studio 2017 for development environment. Simply installing Casablanca via vcpkg will setup everything needed. C:\src\vcpkg> .\vcpkg install cpprestsdk If you want to build and run test code, you can install UnitTest++ via vcpkg: C:\src\vcpkg> .\vcpkg install unittest-cpp
Via NuGet Because Casablanca does not release NuGet packages anywhere anymore, Starting from 5.1.0, this repository cannot be built with pre-built Casablanca NuGet packages. However, you can export your own version of Casablanca NuGet packages to install dependencies of this project: C:\src\vcpkg> .\vcpkg install cpprestsdk C:\src\vcpkg> .\vcpkg export --nuget cpprestsdk --nuget-id=Casablanca --nuget-version=2.10.18
Manage dependencies by yourself It is not recommended to manage dependencies by yourself. However, you can still build Casablanca by yourself by following these instructions and specify the include directories and link binaries.
As mentioned above, the Azure Storage Client Library for C++ depends on Casablanca. Follow these instructions to compile it.
Clone the project using git:
Install additional dependencies:
Build the SDK for Release:
Install UnitTest++ library:
Build the test code:
Run unit tests
Before building the Azure Storage Client Library on C++, some prerequisites need to be installed first:.
Install prerequisites:
Clone the project using git:
Checkout the version on which Azure Storage Client Library for C++ depends:
Build the project in Release mode
Clone the project using git:
Build the SDK in Release mode:
Clone the project using git:
Build and install the project:
Build the test code:
Run unit tests
Before building the Azure Storage Client Library on C++, some prerequisites need to be installed first:.
Install prerequisites:
Install and enable to use gcc-c++. Note that devtoolset-4 may be not available on some platforms, you can choose to install whichever newer than that, like devtoolset-8.
Download and install boost
Clone the project using git:
Checkout the version on which Azure Storage Client Library for C++ depends:
Build the project in Release mode
Clone the project using git:
Build the SDK in Release mode:
Clone the project using git:
Build and install the project:
Build the test code:
Run unit tests
To build sample code:
To run the samples:
Install dependecies with homebrew:.
Clone the project using git:
If you're using homebrew, there seems to be an issue with the pkg-config files, which means that, by default, a -L flag to tell the linker where libintl lives is left out. We've accounted for this in our CMAKE file, by looking in the usual directory that homebrew puts those libs. If you are not using homebrew, you will get an error stating that you need to tell us where those libs live.
Similarly, for openssl, you don't want to use the version that comes with macOS, it is old. We've accounted for this in the CMAKE script by setting the search paths to where homebrew puts openssl, so if you're not using homebrew you'll need to tell us where a more recent version of openssl lives.
Build the SDK for Release if you are using hombrew:
OR, Build the SDK for Release if you are not using homebrew
<path to Casablanca> to point to your local installation of Casablanca. For example, if the file libcpprest.so exists at location ~/Github/Casablanca/cpprestsdk/Release/build.release/Binaries/libcpprest.dylib, then should be ~/Github/Casablanca/cpprestsdk
<path to openssl> to your local openssl, it is recommended not to use the version that comes with macOS, rather use one from Homebrew or the like. This should be the path that contains the lib and include directories
<path to gettext lib dir> is the directory which contains libintl.dylib
Install UnitTest++ library:
Build the test code:
Run unit tests
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page