You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+40-44Lines changed: 40 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ There is an alternative client library that requires minimum dependency, which p
22
22
23
23
# Getting started
24
24
25
-
For the best development experience, we recommend that developers use the [Vcpkg](https://github.com/Microsoft/vcpkg) as the cross-platform library manager.
25
+
For the best development experience, we recommend that developers use the [vcpkg](https://github.com/Microsoft/vcpkg) as the cross-platform library manager.
26
26
27
27
## Requirements
28
28
@@ -44,24 +44,22 @@ For general suggestions about Azure, use our [Azure feedback forum](http://feedb
44
44
45
45
## Download & Install
46
46
47
-
### Via Git
47
+
### Build from Source
48
48
49
-
To create a local clone of the source for the Azure Storage Client Library for C++ via `git`, type:
49
+
To build with source code, there are three ways to install dependencies:
You can manage the dependencies with Vcpkg, and use Visual Studio 2015 update 3 or Visual Studio 2017 for development environment. Simply install Casablanca via Vcpkg will setup everything needed.
53
+
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.
61
54
```BatchFile
62
55
C:\src\vcpkg> .\vcpkg install cpprestsdk
63
56
```
64
57
58
+
If you want to build and run test code, you can install UnitTest++ via vcpkg:
59
+
```BatchFile
60
+
C:\src\vcpkg> .\vcpkg install unittest-cpp
61
+
```
62
+
65
63
- Via NuGet
66
64
67
65
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:
@@ -72,39 +70,44 @@ To build with source code, there are three ways:
72
70
73
71
- Manage dependencies by yourself
74
72
75
-
It is not recommended to manage dependencies by yourself. However, you can still build Casablanca by yourself and specify the include directories and link binaries.
73
+
It is not recommended to manage dependencies by yourself. However, you can still build Casablanca by yourself by following [these instructions](https://github.com/microsoft/cpprestsdk/wiki) and specify the include directories and link binaries.
76
74
77
-
If you want to build and run test code, you can install UnitTest++ via vcpkg:
78
-
```BatchFile
79
-
C:\src\vcpkg> .\vcpkg install unittest-cpp
75
+
To create a local clone of the source for the Azure Storage Client Library for C++ via git, type:
Follow [Getting Started on Linux](#getting-started-on-linux) or [Getting Started on macOS](#getting-started-on-macos) to build on these two platforms.
83
+
84
+
To build on Windows, directly open the solution file with Visual Studio in project root directory.
85
+
86
+
#### Visual Studio Version
87
+
Starting from version 6.1.0, Azure Storage Client Library for C++ supports Visual Studio 2015 and Visual Studio 2017. In case you have the need to use Visual Studio 2013, please get [version 6.0.0](https://github.com/Azure/azure-storage-cpp/releases/tag/v6.0.0), to use Visual Studio 2012, please get [version 2.0.0](http://www.nuget.org/packages/wastorage/2.0.0).
88
+
82
89
### Via NuGet
83
90
84
-
To install the binaries for the Azure Storage Client Library for C++, you can export a NuGet package with Vcpkg and put it into your local NuGet feed. For more information about how to export a NuGet package, please see [Binary Export](https://github.com/Microsoft/vcpkg/blob/master/docs/specifications/export-command.md).
91
+
To install the binaries for the Azure Storage Client Library for C++, you can export a NuGet package with vcpkg and put it into your local NuGet feed. For more information about how to export a NuGet package, please see [Binary Export](https://github.com/Microsoft/vcpkg/blob/master/docs/specifications/export-command.md).
85
92
86
93
Normally, exporting NuGet package is done with the following command:
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.
100
+
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.
94
101
95
-
install package with:
102
+
Install package with:
96
103
```BatchFile
97
104
C:\src\vcpkg> .\vcpkg install azure-storage-cpp
98
105
```
99
-
100
-
#### Visual Studio Version
101
-
Starting from version 6.1.0, Azure Storage Client Library for C++ supports Visual Studio 2015 and Visual Studio 2017. In case you have the need to use Visual Studio 2013, please get [version 6.0.0](https://github.com/Azure/azure-storage-cpp/releases/tag/v6.0.0), to use Visual Studio 2012, please get [version 2.0.0](http://www.nuget.org/packages/wastorage/2.0.0).
102
-
103
106
## Dependencies
104
107
105
108
### C++ REST SDK
106
109
107
-
The Azure Storage Client Library for C++ depends on the C++ REST SDK (codename "Casablanca") It can be installed through Vcpkg (vcpkg install cpprestsdk) or downloaded directly from [GitHub](https://github.com/Microsoft/cpprestsdk/releases/).
110
+
The Azure Storage Client Library for C++ depends on the C++ REST SDK (codename "Casablanca") It can be installed through vcpkg (`vcpkg install cpprestsdk`) or downloaded directly from [GitHub](https://github.com/Microsoft/cpprestsdk/releases/).
108
111
109
112
The validated Casablanca version for each major or recent release on different platforms can be found in the following chart:
110
113
@@ -168,6 +171,7 @@ To build and run unit tests:
168
171
```bash
169
172
sudo apt-get install libunittest++-dev
170
173
```
174
+
171
175
- Build the test code:
172
176
```bash
173
177
CASABLANCA_DIR=<path to Casablanca> CXX=g++-5.1 cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON
@@ -182,17 +186,14 @@ vi test_configurations.json # modify test config file to include your storage ac
182
186
183
187
To build sample code:
184
188
```bash
189
+
vi ../samples/SamplesCommon/samples_common.h # modify connection string to include your storage account credentials
185
190
CASABLANCA_DIR=<path to Casablanca> CXX=g++-5.1 cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SAMPLES=ON
186
191
make
187
192
```
188
193
To run the samples:
189
194
```bash
190
195
cd Binaries
191
-
vi ../../samples/SamplesCommon/samples_common.h # modify connection string to include your storage account credentials
192
-
./samplesblobs # run the blobs sample
193
-
./samplesjson # run the tables sample with JSON payload
194
-
./samplestables # run the tables sample
195
-
./samplesqueues # run the queues sample
196
+
./azurestoragesample
196
197
```
197
198
198
199
Please note the current build script is only tested on Ubuntu 16.04. Please update the script accordingly for other distributions.
@@ -204,6 +205,7 @@ Please note that starting from 2.10.0, Casablanca requires a minimum version of
204
205
*Please note the following build script is only tested on SLES12 SP3. The script may need to be updated accordingly for other distributions.*
205
206
206
207
Before building the Azure Storage Client Library on C++, some prerequisites need to be installed first:
vi ../../samples/SamplesCommon/samples_common.h # modify connection string to include your storage account credentials
401
-
./samplesblobs # run the blobs sample
402
-
./samplesjson # run the tables sample with JSON payload
403
-
./samplestables # run the tables sample
404
-
./samplesqueues # run the queues sample
400
+
./azurestoragesample
405
401
```
406
402
407
-
## Getting Started on OSX
403
+
## Getting Started on macOS
408
404
409
-
*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*
405
+
*Note that macOS 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*
410
406
411
407
Install dependecies with homebrew:
412
408
@@ -432,7 +428,7 @@ The project is cloned to a folder called `azure-storage-cpp`. Always use the mas
432
428
433
429
**Some notes about building**:
434
430
- 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.
435
-
- 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.
431
+
- 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.
436
432
437
433
- Build the SDK for Release if you are using hombrew:
438
434
```bash
@@ -455,7 +451,7 @@ make
455
451
456
452
In the above command, replace:
457
453
-`<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 <pathtocasablanca> should be `~/Github/Casablanca/cpprestsdk`
458
-
-`<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
454
+
-`<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
459
455
-`<path to gettext lib dir>` is the directory which contains `libintl.dylib`
0 commit comments