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

Install dependent libraries

Before you install the SDK for C++, you must install the required dependent libraries, including Boost and OpenSSL libraries, and the C++ REST SDK. You can use one of the following methods based on your operating system to install the dependent libraries:

  • If your operating system is macOS, we recommend that you use Homebrew to install the dependent libraries.
    brew install boost cpprestsdk openssl
  • If your operating system is Linux, we recommend that you use YUM or apt-get to install the dependent libraries.
    • yum install boost-devel openssl-devel
      Note You cannot install the C++ REST SDK by using YUM.
    • 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
  • If your operating system is Windows, we recommend that you use vcpkg to install the dependent libraries.
    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 directory 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 directory 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.