Help Center> Object Storage Service> C> SDK Compilation
Updated on 2023-12-08 GMT+08:00

SDK Compilation

You can compile the SDK based on the platform you are using. Before that, you must obtain the SDK source code.

  • In Linux:

Go to the source/eSDK_OBS_API/eSDK_OBS_API_C++/ directory and run the following script:

export SPDLOG_VERSION=spdlog-1.9.2

# On an x86 server, run the following command:

bash build.sh sdk

# On an Arm server, run the following command:

bash build_aarch.sh sdk

For details about the parameters, see the comments in the scripts. The generated content includes the files shown in the following figure.

  • In Windows:

Use Visual Studio to open the sln file in source/eSDK_OBS_API/eSDK_OBS_API_C++/sln/vc100/ and generate the obs project. Then, huaweisecurec.lib, huaweisecurec.dll, libeSDKOBS.lib, and libeSDKOBS.dll are generated in the output directory (which can be queried in the project properties).

  • In macOS:

See compile_for_macos.txt.

To learn common compile errors, see Common Compile Errors.