1# how to use examples 2 3## 1. Install SDK according to [README](https://github.com/aliyun/aliyun-openapi-cpp-sdk/blob/master/README.md) 4 5## 2. build examples 6 7### Linux 8 9```bash 10cd path/to/aliyun-openapi-cpp-sdk 11cd examples 12mkdir build 13cd build 14cmake .. 15make -j 16``` 17 18### Windows 19 20- Generate Visual Studio solution with the same way as buidl SDK. 21 22 - Run cmake-ui 23 24 - select source code path(examples dir) and build path (create build dir in examples dir). 25 26 - configure 27 28 - generate 29 30- Open `alibabacloud-sdk-examples.sln` in build directory. 31 32- Build -> Build Solution 33 34 35## 3. run examples 36 37### Linux 38 39- configure `accessKeyId` and `accessKeySecret` via env and then Run. 40 41```bash 42export ENV_AccessKeyId="your-accessKeyId" 43export ENV_AccessKeySecret="your-accessKeySecret" 44 45cd path/to/aliyun-openapi-cpp-sdk 46cd examples/build/bin 47 48# run ecs_demo 49./ecs_demo 50... 51``` 52 53### Windows 54 55Configure env according to your windows OS. 56 57Run .exe file in command window in directory build\\bin\\Release 58