FAQ
Q1: Compilation failed with error undefined reference to
'uuid_generate'
.
- Probable Causes
This error may arise if the libuuid-devel library is not installed on the system or the -luuid parameter is not included during the linking process.
-
Solutions
To resolve this issue, first, ensure that you have correctly linked the uuid library by including the -luuid parameter during the linking process. Additionally, you may need to install the libuuid-devel library on your system. For CentOS systems, you can install the required library by running the command
sudo yum install libuuid-devel
. On Ubuntu systems, use the commandsudo apt-get install uuid-dev
.
Q2: Compilation (with Visual Studio 2022) failed witherror
unresolved external symbol
.
- Probable Causes
You may encounter this error if the predefined macro _DDBAPIDLL was inadvertently included during the compilation.
- Solutions
To resolve this issue, remove the _DDBAPIDLL from the compilation process.
Q3: Compilation (on Linux) failed with
error undefined reference to
dolphindb::DBConnection::connect(…)
.
- Probable Causes
The error may occur due to an inconsistency in the value of the GLIBCXX_USE_CXX11_ABI macro during compilation.
- Solutions
To resolve this issue, recompile either the C++ API shared libraries and executable files, ensuring that the value of the GLIBCXX_USE_CXX11_ABI macro is consistent across both compilations.
Q4: Running C++ application (on Linux) failed with
error cannot open the shared object file
.
- Probable Causes
The error may occur when the required shared library (libDolphinDBAPI.so or libssl.so) cannot be located at runtime.
- Solutions
- Place the relevant shared library files in the same directory as the executable file.
- Manually set the LD_LIBRARY_PATH environment variable before running
the application. Use the command
export LD_LIBRARY_PATH=libPath
to specify the library search path.
Q5: Debug assertion failed when running in Visual Studio.
- Probable Causes
- The DolphinDBAPI.dll was compiled with the runtime library selected as MT (Multi-threaded) or MTD (Multi-threaded Debug).
- The shared libraries and executable files were compiled using different versions of Visual Studio.
- The Release/Debug configuration used for compiling the shared library and the executable are inconsistent.
- Solutions
- MD (Multi-threaded DLL) or MDD (Multi-threaded Debug DLL) is recommended.
- Ensure that the version of Visual Studio is consistent during compilation.
- Ensure that the Release/Debug configuration is consistent during compilation.