Cannot load QOCI SQL driver even successfully built
Solved
General and Desktop
-
I've built QOCI SQL driver following https://doc.qt.io/qt-6/sql-driver.html#how-to-build-the-oci-plugin-on-windows and dlls could be found under D:\Qt\6.7.2\msvc2019_64\plugins\sqldrivers. In Qt Creator, I can successfully load the QOCI SQL driver, but if I switch to manual CMake Configuration the driver fails to be loaded.
My CMake options are:-DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=E:/Program Files/JetBrains/CLion/bin/ninja/win/x64/ninja.exe" -DCMAKE_PREFIX_PATH=D:\Qt\6.7.2\msvc2019_64\lib\cmake "-DCMAKE_TOOLCHAIN_FILE=D:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\vcpkg\scripts\buildsystems\vcpkg.cmake" -G Ninja -S E:\Documents\GitHub\MyProject -B E:\Documents\GitHub\MyProject\cmake-build-debug-visual-studio
By debugging, I found that the available drivers include the "default" ones (i.e., QSQLITE QMIMER QODBC QPSQL):
QSqlDatabase: QOCI driver not loaded QSqlDatabase: available drivers: QSQLITE QMIMER QODBC QPSQL
How to load the SQL driver in my CMake project?
-