Name: azure-storage-cpp
Owner: heliumdatacommons
Description: Microsoft Azure Storage Client Library for C++
Forked from: Azure/azure-storage-cpp
Created: 2018-02-07 15:21:55.0
Updated: 2018-02-07 15:21:57.0
Pushed: 2018-02-07 15:44:26.0
Homepage: http://azure.github.io/azure-storage-cpp
Size: 28219
Language: C++
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a helium data commons fork of the Microsoft azure storage library. The only current change is in the CMakeLists.txt file in the Microsoft.WindowsAzure.Storage directory. We've added a stanza that allows you to build this library using the iRODS cmake, boost and clang environment so that you can build an irods compatabile azure plugin. An example invocation of cmake would be
where CASABLANCA dir is where you have built version 2.9.1 of the microsoft cpprest library.
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.
For the best development experience, we recommend that developers use the official Microsoft NuGet packages for libraries. NuGet packages are regularly updated with new functionality and hotfixes. Download the NuGet Package.
Azure Storage Client Library for C++ is also avaiable on Vcpkg since v2.5.0. To get know more about Vcpkg, please visit https://github.com/Microsoft/vcpkg.
To call Azure services, you must first have an Azure subscription. Sign up for a free trial or use your MSDN subscriber benefits.
Be sure to check out the Azure Storage Forum on MSDN if you need help, or use StackOverflow.
We gladly accept community contributions.
For general suggestions about Azure, use our Azure feedback forum.
To create a local clone of the source for the Azure Storage Client Library for C++ via git
, type:
clone https://github.com/Azure/azure-storage-cpp.git
zure-storage-cpp
To install the binaries for the Azure Storage Client Library for C++, type the following into the NuGet Package Manager console:
Install-Package wastorage
To install the Azure Storage Client Library for C++ through Vcpkg, you need Vcpkg installed first. Please follow the instructions(https://github.com/Microsoft/vcpkg#quick-start) to install Vcpkg.
install package with:
rc\vcpkg> .\vcpkg install azure-storage-cpp
Starting from version 2.1.0, Azure Storage Client Library for C++ supports Visual Studio 2013 and Visual Studio 2015. In case you have the need to use Visual Studio 2012, please get version 2.0.0.
The Azure Storage Client Library for C++ depends on the C++ REST SDK (codename “Casablanca”) 2.9.1. It can be installed through NuGet or downloaded directly from GitHub.
To get started with the coding, please visit the following articles:
To accomplish specific tasks, please find the code samples at samples folder.
As mentioned above, the Azure Storage Client Library for C++ depends on Casablanca. Follow these instructions to compile it. Current version of the library depends on Casablanca version 2.9.1.
Once this is complete, then:
clone https://github.com/Azure/azure-storage-cpp.git
The project is cloned to a folder called azure-storage-cpp
. Always use the master branch, which contains the latest release. apt-get install libxml++2.6-dev libxml++2.6-doc uuid-dev
zure-storage-cpp/Microsoft.WindowsAzure.Storage
r build.release
uild.release
BLANCA_DIR=<path to Casablanca> CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Release
In the above command, replace <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.so
, then your cmake
command should be:BLANCA_DIR=~/Github/Casablanca/cpprestsdk CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Release
The library is generated under azure-storage-cpp/Microsoft.WindowsAzure.Storage/build.release/Binaries/
.To build and run unit tests:
apt-get install libunittest++-dev
BLANCA_DIR=<path to Casablanca> CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON
inaries
est_configurations.json # modify test config file to include your storage account credentials
urestoragetest
To build sample code:
BLANCA_DIR=<path to Casablanca> CXX=g++-4.8 cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SAMPLES=ON
To run the samples:
inaries
./../samples/SamplesCommon/samples_common.h # modify connection string to include your storage account credentials
mplesblobs # run the blobs sample
mplesjson # run the tables sample with JSON payload
mplestables # run the tables sample
mplesqueues # run the queues sample
Please note the current build script is only tested on Ubuntu 14.04. Please update the script accordingly for other distributions.
Note that OSX is not officially supported yet, but it has been seen to work, YMMV. This build has been tested to work when the dependencies are installed via homebrew, YMMV if using FINK or MacPorts
Install dependecies with homebrew:
install libxml++ ossp-uuid openssl
As mentioned above, the Azure Storage Client Library for C++ depends on Casablanca. If you are using homebrew you can install it from there:
install cpprestsdk
Otherwise, you may need to build it. Follow these instructions to compile it. Current version of the library depends on Casablanca version 2.9.1.
Once this is complete, then:
clone https://github.com/Azure/azure-storage-cpp.git
The project is cloned to a folder called azure-storage-cpp
. Always use the master branch, which contains the latest release.Some notes about building:
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 OSX, 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:
zure-storage-cpp/Microsoft.WIndowsAzure.Storage
r build.release
uild.release
e .. -DCMAKE_BUILD_TYPE=Release
OR, Build the SDK for Release if you are not using homebrew
zure-storage-cpp/Microsoft.WindowsAzure.Storage
r build.release
uild.release
BLANCA_DIR=<path to casablanca> cmake .. -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=<path to openssl> -DGETTEXT_LIB_DIR=<path to gettext lib dir>
In the above command, replace:
<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 ~/Github/Casablanca/cpprestsdk
<path to openssl>
to your local openssl, it is recommended not to use the version that comes with OSX, 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
For example you might use:
BLANCA_DIR=~/Github/Casablanca/cpprestsdk cmake .. -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DGETTEXT_LIB_DIR=/usr/local/opt/gettext/lib
The library is generated under azure-storage-cpp/Microsoft.WindowsAzure.Storage/build.release/Binaries/
.
To build and run unit tests:
install unittest-cpp
e .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON
inaries
est_configurations.json # modify test config file to include your storage account credentials
urestoragetest