Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot load QOCI SQL driver even successfully built

Cannot load QOCI SQL driver even successfully built

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 200 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yihua Liu
    wrote on 14 Sept 2024, 08:43 last edited by
    #1

    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?

    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      Yihua Liu
      wrote on 14 Sept 2024, 09:08 last edited by
      #2

      Problem solved. Need to rerun windeployqt command

      1 Reply Last reply
      0
      • Y Yihua Liu has marked this topic as solved on 14 Sept 2024, 09:08

      1/2

      14 Sept 2024, 08:43

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved