Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to use OCI with Qt on OS X ?
QtWS25 Last Chance

How to use OCI with Qt on OS X ?

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 655 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.
  • C Offline
    C Offline
    crislacerda
    wrote on last edited by A Former User
    #1

    Hello I'm new to booth QT and oracle but and i've keep falling on building the OCI driver. I found the official documentation at http://doc.qt.io/qt-5/sql-driver.html to be booth incomplete and out of date.
    Also I've been using QT only through QTCreator and have no experience with building anything.

    So I downloaded booth the sdk and instant client from oracle and unzipped it then I created the symbolic link as oracle suggest in their site. This is what they call installation of the driver, but i'm not sure.... Then I tried to follow the instructions on the doc

    cd $QTDIR/qtbase/src/plugins/sqldrivers/oci 
    

    But my qt folders are a bit different. I've installed qt from the installer. But I found the sqldrivers folder on:

    /Users/myuser/Qt5.7.0/5.7/clang_64/plugins/sqldrivers
    

    But there was no oci folder there, so I just made on and cded to it and tried

    qmake "INCLUDEPATH+=$ORACLE_HOME/rdbms/public $ORACLE_HOME/rdbms/demo" "LIBS+=-L$ORACLE_HOME/lib -lclntsh -lwtc9" oci.pro
    

    Changing booth the include path and libs to the include path inside sdk folder and to the instant client folder itself.
    But then I got an error found saying qmake was not found. Again I found the qmake binary at my qt folder so I tried:

    /Users/myuser/Qt5.7.0/5.7/clang_64/bin/qmake "INCLUDEPATH+=/Users/myuser/instantclient11.2.0.3/sdk/include" "/Users/myuser/instantclient_11_2-4 -lclntsh -lwtc9" oci.pro
    

    But then I got the following error

    Cannot find file: /Users/myuser/instantclient_11_2-4 -lclntsh -lwtc9.
    Cannot find file: oci.pro.
    

    And have no idea how to proceed next. I've googled a lot I found some similar problems mostly on windows but again due to my lack of knowledge I haven´t been able to make any sense of it. So bear mind while answering me that I'm a completely beginner and have no idea by what you mean by something like "add oci to qt path" or that I need to "build oci".
    If possible give me clear and precise instructions otherwise I think i will have to go back to Java for this noooo!
    Is there any other driver that can be used to access an oracle db?

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

      Hi and welcome to devnet,

      First thing: you need to download Qt's sources, you are trying to build the plugin in your installed Qt. The sources can be downloaded through the Maintenance Tool.

      The on your line your are missing LIBS+= for the linking part so your should have something like "LIBS+=-L/Users/myuser/instantclient_11_2-4 -lclntsh -lwtc9"

      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
      0

      • Login

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