All Products
Search
Document Center

Object Storage Service:FAQ (C++ SDK)

Last Updated:Mar 20, 2026

Common questions and resolutions for OSS SDK for C++.

Symptoms index

Error messageSection
Request body is in fail state. Logical error on i/o operation.iostream state error on upload
Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.CMake bootstrap fails: C++ compiler not found
Could not find OpenSSL.CMake bootstrap fails: OpenSSL not found

iostream state error on upload

Request body is in fail state. Logical error on i/o operation.

This error occurs when the iostream object passed to the SDK is already in a failed state. Before uploading, OSS SDK for C++ calls bad() and fail() on the iostream object to validate its state. If either check fails, the upload is rejected.

Check the state of your iostream object before passing it to the SDK. If you created the stream using fstream, verify that the file path exists and is correct.

CMake bootstrap fails: C++ compiler not found

Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
Please specify one using environment variable CXX.

CMake requires a C++ compiler before it can bootstrap. Install GNU Compiler Collection (GCC), then re-run ./bootstrap:

yum -y install gcc

GCC provides the C++ compiler that CMake needs to satisfy the C++11 requirement.

CMake bootstrap fails: OpenSSL not found

CMake Error at Utilities/cmcurl/CMakeLists.txt:525 (message):
  Could not find OpenSSL. Install an OpenSSL development package or
  configure CMake with -DCMAKE_USE_OPENSSL=OFF to build without OpenSSL.

Choose one of the following based on whether your project requires TLS/HTTPS:

Install OpenSSL (recommended for projects that use TLS/HTTPS)

Install the OpenSSL development package before running ./bootstrap:

yum -y install openssl-devel

Skip OpenSSL (for projects that do not require TLS/HTTPS)

Pass --DCMAKE_USE_OPENSSL=OFF during pre-configuration to disable the OpenSSL dependency:

./configure --DCMAKE_USE_OPENSSL=OFF && gmake && gmake install

OpenSSL version in the C++ SDK

OSS SDK for C++ is compatible with OpenSSL 3.x. Select the OpenSSL version based on your project's requirements and security compliance needs.

The SDK handles OpenSSL differently depending on your operating system:

  • Linux: If you are on Linux, the SDK automatically detects the OpenSSL version installed on the system. No additional configuration is needed.

  • Windows: If you are on Windows, the SDK pre-integrates a specific version of OpenSSL to simplify setup and deployment, because Windows lacks centralized OpenSSL installation standards.