This topic provides answers to some commonly asked questions about Object Storage Service (OSS) SDK for C++.
What do I do if the “Request body is in fail state. Logical error on i/o operation." error message is returned when I upload an object?
Cause
Before you upload an object, OSS SDK for C++ calls the bad() and fail() operations to check the status of the current iostream object. If the status is incorrect, this error message is returned.
Solution
Check the status of the iostream object. If the object is created by using fstream, check whether the specified file path is correct.
What do I do if an error message is returned when I run ./bootstrap during the installation of CMake in Linux?
Error message:
Error when bootstrapping CMake:
Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
Please specify one using environment variable CXX.
Cause
No GNU Compiler Collection (GCC) is installed before you install CMake.
Solution
Install GCC before you install CMake. Command for installing GCC in Linux:
yum -y install gcc
What do I do if OpenSSL cannot be found during the automatic startup process when I run ./bootstrap to install CMake in Linux?
Error message:
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.
Cause
OpenSSL is required to install CMake. Before you install CMake, you must install openssl-device or skip OpenSSL dependency during pre-configuration by specifying the DCMAKE_USE_OPENSSL=OFF parameter.
Solution
Method 1: Install OpenSSL before you install CMake Command for installing GCC in Linux:
yum -y install openssl-devel
Method 2: Skip the OpenSSL dependency by specifying the DCMAKE_USE_OPENSSL=OFF parameter during pre-configuration
./configure ---DCMAKE_USE_OPENSSL=OFF && gmake && gmake install
What do I do if an error is reported when I use OpenSSL in OSS SDK for C++?
OpenSSL is a third-party library that is frequently updated. Different users may have different requirements for the versions of OpenSSL based on their project features and security compliance requirements. OSS SDK for C++ is compatible with OpenSSL 3.x. We recommend that you select the version of OpenSSL based on the specific requirements of your project.
In the Linux environment, OSS SDK for C++ can automatically detect the version of OpenSSL installed on the system. You can use the existing OpenSSL for development without additional configurations, which ensures flexibility and convenience.
In the Windows environment, due to the lack of centralized OpenSSL installation standards and commands, OSS SDK for C++ pre-integrates a specific version of OpenSSL to simplify the configurations and ensure the rapid construction and deployment of OSS SDK for C++.