Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[SOLVED] Problem with compiling driver for oracle database (oci)



  • Hi, I have big problem with compiling driver for oracle database. I read the "documentation":http://qt-project.org/doc/qt-5/sql-driver.html#qoci and I don't know what I do wrong...

    I would like build oci for ubuntu, I download from oracle Instant Client Package - Basic and Instant Client Package - SDK. I unpack this zips to dir /usr/local/oracleinstantclient/. Sdk is in /usr/local/oracleinstantclient/sdk. In next step I create symlink in /usr/local/oracleinstantclient/libclntsh.so (links to libclntsh.so -> libclntsh.so.12.1) and libocci.so -> libocci.so.12.1...
    Next I create configuration for dynamic linker /etc/ld.so.conf.d/oracle.conf with path:
    /usr/local/oracleinstantclient
    and run sudo ldconfig. I set also variable ORACLE_HOME=/usr/local/oracleinstantclient

    When I am in directory ~/Qt5.2.1/5.2.1/Src/qtbase/src/plugins/sqldrivers/oci and run
    qmake "INCLUDEPATH+=/usr/local/oracleinstantclient/sdk/include" "LIBS+=-L/usr/local/oracleinstantclient" oci.pro
    I got Project ERROR: addExclusiveBuilds() requires at least two arguments and I don't know what is wrong...
    Could you help me? :)


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Are you sure you are using the correct qmake ?

    Please check with qmake --version



  • Hi and thanks for your answer :) I checked qmake version:

    QMake version 3.0
    Using Qt version 5.0.2 in /usr/lib/i386-linux-gnu

    It's right version?


  • Lifetime Qt Champion

    No it's not, you are using the qmake installed on your system and not the 5.2.1 you installed yourself.

    Use the full path to the Qt 5.2.1 qmake and you should be good to go



  • You're right, thanks :)


  • Lifetime Qt Champion

    You're welcome !

    Happy coding :)


Log in to reply