|
| 1 | + |
| 2 | +# Installation |
| 3 | + |
| 4 | +## Required Dependency Libraries |
| 5 | + |
| 6 | +- [Boost](https://www.boost.org/users/download/) |
| 7 | +- [CPPRestSDK](https://github.com/microsoft/cpprestsdk/releases) |
| 8 | +- [OpenSSL](https://www.openssl.org/source/) |
| 9 | +- [Git](https://git-scm.com/) |
| 10 | + |
| 11 | +To use this SDK to access the API, you must first install the required dependency libraries. |
| 12 | + |
| 13 | +- Install with Homebrew |
| 14 | + |
| 15 | +```bash |
| 16 | +brew install boost cpprestsdk openssl |
| 17 | +``` |
| 18 | + |
| 19 | +- Install with yum |
| 20 | + |
| 21 | +```bash |
| 22 | +yum install boost-devel openssl-devel |
| 23 | + |
| 24 | +# The cpprestsdk does not support installation with yum. |
| 25 | +``` |
| 26 | + |
| 27 | +- Install with api-get |
| 28 | + |
| 29 | +```bash |
| 30 | +# install boost |
| 31 | +sudo add-apt-repository ppa:mhier/libboost-latest -y |
| 32 | +sudo apt-get update |
| 33 | +sudo apt-get install libboost-all-dev |
| 34 | + |
| 35 | +sudo apt-get install libcpprest-dev libcurl4-openssl-dev libssl-dev |
| 36 | +``` |
| 37 | + |
| 38 | +- Install with vcpkg |
| 39 | + |
| 40 | +```bash |
| 41 | +vcpkg install boost cpprestsdk openssl-windows |
| 42 | +``` |
| 43 | + |
| 44 | +## Install |
| 45 | + |
| 46 | +### Linux |
| 47 | + |
| 48 | +```bash |
| 49 | +git clone https://github.com/aliyun/alibabacloud-cpp-sdk.git |
| 50 | +cd ecs-20140526/ |
| 51 | +sh scripts/install.sh |
| 52 | +``` |
| 53 | + |
| 54 | +### Windows |
| 55 | + |
| 56 | +1. Run the following command to clone code from Github via [git-bash](https://git-scm.com/downloads): |
| 57 | + |
| 58 | + ```bash |
| 59 | + git clone https://github.com/aliyun/alibabacloud-cpp-sdk.git |
| 60 | + cd alibabacloud-cpp-sdk/ecs-20140526 |
| 61 | + ``` |
| 62 | + |
| 63 | +2. Build Visual Studio solution |
| 64 | + * Install [CMake](https://cmake.org/download/) && [Visual Studio](https://visualstudio.microsoft.com/zh-hans/) |
| 65 | + * Change directory to source code and make the `cmake_build` folder in the ecs-20140526 project root directory. |
| 66 | + * Open [CMake](https://cmake.org/download/) software and |
| 67 | + * `Browse Source` to open source code directory. |
| 68 | + * `Browse build` to open the created `cmake_build` directory |
| 69 | + * click `configure` |
| 70 | + * click `generate`, Generate VS solution |
| 71 | + |
| 72 | +3. Build and Install C++ SDK |
| 73 | + * Go to the cmake_build directory and open ${project_name}.sln with Visual Studio Solutions |
| 74 | + * Select `Release` |
| 75 | + * Check INSTALL option from Build -> Configuration Manager |
| 76 | + * Build->Build Solutions to build. |
0 commit comments