Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 6ea9817

Browse files
Jinming-Huvinjiang
authored andcommitted
Update README
1 parent 3c02188 commit 6ea9817

File tree

1 file changed

+40
-44
lines changed

1 file changed

+40
-44
lines changed

README.md

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ There is an alternative client library that requires minimum dependency, which p
2222

2323
# Getting started
2424

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.
2626

2727
## Requirements
2828

@@ -44,24 +44,22 @@ For general suggestions about Azure, use our [Azure feedback forum](http://feedb
4444

4545
## Download & Install
4646

47-
### Via Git
47+
### Build from Source
4848

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:
5050

51-
```bash
52-
git clone https://github.com/Azure/azure-storage-cpp.git
53-
cd azure-storage-cpp
54-
```
51+
- Via vcpkg
5552

56-
To build with source code, there are three ways:
57-
58-
- Via Vcpkg
59-
60-
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.
6154
```BatchFile
6255
C:\src\vcpkg> .\vcpkg install cpprestsdk
6356
```
6457
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+
6563
- Via NuGet
6664
6765
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:
7270
7371
- Manage dependencies by yourself
7472
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.
7674
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:
76+
77+
```bash
78+
git clone https://github.com/Azure/azure-storage-cpp.git
79+
cd azure-storage-cpp
8080
```
8181

82+
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+
8289
### Via NuGet
8390

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).
8592

8693
Normally, exporting NuGet package is done with the following command:
8794
```BatchFile
8895
C:\src\vcpkg> .\vcpkg export --nuget azure-storage-cpp --nuget-id=Microsoft.Azure.Storage.CPP --nuget-version=7.0.0
8996
```
9097

91-
### Via Vcpkg
98+
### Via vcpkg
9299

93-
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.
94101

95-
install package with:
102+
Install package with:
96103
```BatchFile
97104
C:\src\vcpkg> .\vcpkg install azure-storage-cpp
98105
```
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-
103106
## Dependencies
104107

105108
### C++ REST SDK
106109

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/).
108111

109112
The validated Casablanca version for each major or recent release on different platforms can be found in the following chart:
110113

@@ -168,6 +171,7 @@ To build and run unit tests:
168171
```bash
169172
sudo apt-get install libunittest++-dev
170173
```
174+
171175
- Build the test code:
172176
```bash
173177
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
182186

183187
To build sample code:
184188
```bash
189+
vi ../samples/SamplesCommon/samples_common.h # modify connection string to include your storage account credentials
185190
CASABLANCA_DIR=<path to Casablanca> CXX=g++-5.1 cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SAMPLES=ON
186191
make
187192
```
188193
To run the samples:
189194
```bash
190195
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
196197
```
197198

198199
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
204205
*Please note the following build script is only tested on SLES12 SP3. The script may need to be updated accordingly for other distributions.*
205206

206207
Before building the Azure Storage Client Library on C++, some prerequisites need to be installed first:
208+
207209
- Install prerequisites:
208210
```bash
209211
sudo zypper install git gcc-c++ boost-devel cmake libopenssl-devel libxml2-devel libuuid-devel
@@ -280,17 +282,14 @@ vi test_configurations.json # modify test config file to include your storage ac
280282

281283
To build sample code:
282284
```bash
285+
vi ../samples/SamplesCommon/samples_common.h # modify connection string to include your storage account credentials
283286
CXX=g++-5.1 cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SAMPLES=ON
284287
make
285288
```
286289
To run the samples:
287290
```bash
288291
cd Binaries
289-
vi ../../samples/SamplesCommon/samples_common.h # modify connection string to include your storage account credentials
290-
./samplesblobs # run the blobs sample
291-
./samplesjson # run the tables sample with JSON payload
292-
./samplestables # run the tables sample
293-
./samplesqueues # run the queues sample
292+
./azurestoragesample
294293
```
295294

296295
### Getting Started on CentOS 6/7
@@ -390,23 +389,20 @@ vi test_configurations.json # modify test config file to include your storage ac
390389

391390
- To build sample code:
392391
```bash
392+
vi ../samples/SamplesCommon/samples_common.h # modify connection string to include your storage account credentials
393393
cmake3 .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SAMPLES=ON
394394
make
395395
```
396396

397397
- To run the samples:
398398
```bash
399399
cd Binaries
400-
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
405401
```
406402

407-
## Getting Started on OSX
403+
## Getting Started on macOS
408404

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*
410406

411407
Install dependecies with homebrew:
412408

@@ -432,7 +428,7 @@ The project is cloned to a folder called `azure-storage-cpp`. Always use the mas
432428

433429
**Some notes about building**:
434430
- 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.
436432

437433
- Build the SDK for Release if you are using hombrew:
438434
```bash
@@ -455,7 +451,7 @@ make
455451

456452
In the above command, replace:
457453
- `<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 <path to casablanca> 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
459455
- `<path to gettext lib dir>` is the directory which contains `libintl.dylib`
460456

461457
For example you might use:

0 commit comments

Comments
 (0)