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. QT5.6 + OSX: QOCI driver not loaded but available
Forum Updated to NodeBB v4.3 + New Features

QT5.6 + OSX: QOCI driver not loaded but available

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 2.7k Views 1 Watching
  • 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.
  • zolotukhinZ Offline
    zolotukhinZ Offline
    zolotukhin
    wrote on last edited by
    #1

    OSX: 10.11.4
    QT: 5.6
    Oracle: 11.2 64-bit

    Trying to create simple application with Oracle connection. libqsqloci is created successfully (thanks for manual), libqsqloci.dylib is locating in clang_64/plugins/sqldrivers

    .pro file:

    QT += core gui sql

    .cpp file:

    #include <QSqlDatabase>

    ...

    QSqlDatabase db = QSqlDatabase::addDatabase("QOCI");

    Application starts... and I see error:

    QSqlDatabase: QOCI driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QOCI QOCI8 QODBC QODBC3 QPSQL QPSQL7

    I not found anything working solution, so decide to ask here. Thank you

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Do you have the OCI libraries installed on your system ? More information about them here

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      zolotukhinZ 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Do you have the OCI libraries installed on your system ? More information about them here

        zolotukhinZ Offline
        zolotukhinZ Offline
        zolotukhin
        wrote on last edited by
        #3

        @SGaist Thanks for reply. OCI libraries is installed, tnsnames is created, sqlplus is working successfully.

        My zshrc:
        export PATH=/usr/local/bin:$PATH
        export ORACLE_HOME=/Volumes/Data/Oracle/instantclient_11_2
        export LD_LIBRARY_PATH=$ORACLE_HOME
        export DYLD_LIBRARY_PATH=$ORACLE_HOME
        export TNS_ADMIN=$ORACLE_HOME/network/admin
        export OCI_HOME=$ORACLE_HOME
        export OCI_INCLUDE_DIR=$ORACLE_HOME/sdk/include
        export OCI_VERSION=11
        export NLS_LANG=AMERICAN_AMERICA.CL8MSWIN1251
        export PATH=$ORACLE_HOME:$PATH
        export CLASSPATH=$ORACLE_HOME:$PATH

        export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME:/Volumes/Data/Qt5.6.0/5.6/clang_64/plugins/sqldrivers/

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Then you should run otool -L on the Qt OCI plugin to see if it is missing something.

          By the way, there's no need to put Qt's plugins folder in the LD_LIBRARY_PATH.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          O 1 Reply Last reply
          1
          • SGaistS SGaist

            Then you should run otool -L on the Qt OCI plugin to see if it is missing something.

            By the way, there's no need to put Qt's plugins folder in the LD_LIBRARY_PATH.

            O Offline
            O Offline
            OAmila
            wrote on last edited by
            #5

            @SGaist

            I am new to QT, Can you please tell me how to run otool -L

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              otool has nothing to do with Qt. It's a macOS tool. Calling otool in your command prompt would have shown you have to use it faster than waiting on an answer here.

              otool -L /path/to/library_or_executable

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              2

              • Login

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