This topic describes how to install EventBridge SDK for C++.

Install a dependent library

  • Use Homebrew
    brew install boost cpprestsdk openssl
  • Use YUM
    yum install boost-devel openssl-devel
    Note You cannot install the C++ REST SDK by using YUM.
  • Use apt-get
    sudo add-apt-repository ppa:mhier/libboost-latest -y 
    sudo apt-get update 
    sudo apt-get install libboost-all-dev 
    sudo apt-get install libcpprest-dev libcurl4-openssl-dev libssl-dev
  • Use vcpkg
    vcpkg install boost openssl-windows cpprestsdk

Install the SDK

Linux

  1. Run the following command to clone the source code from GitHub:
    git clone https://github.com/alibabacloud-sdk-cpp/eventbridge.git
  2. Run the following command to go to the eventbridge directory and install the SDK:
    cd eventbridge 
    sh scripts/install.sh

Windows

  1. Run the following command to clone the source code from GitHub:
    git clone https://github.com/alibabacloud-sdk-cpp/eventbridge.git
  2. Create an empty folder cmake_build in the root directory of the project.
  3. Perform the following steps in CMake:
    1. Click Browse Source and select the alibabacloud_event_bridge directory as the source code directory.
    2. Click Browse Build and select the cmake_build folder as the build directory.
    3. Click Configure.
    4. Click Generate to build a Visual Studio solution.
  4. In the cmake_build directory, use Visual Studio to open the solution darabonba_core.sln.
  5. Select Release, select Install in the Configuration Manager dialog box, and then choose Build > Build Solution.