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. Not able to enable QOCI in Qt Creator
Forum Updated to NodeBB v4.3 + New Features

Not able to enable QOCI in Qt Creator

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 1 Posters 307 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.
  • S Offline
    S Offline
    SanthoshPSK
    wrote on last edited by
    #1

    I am trying to enable QOCI in Qt Creator using below command.

    qmake -- OCI_PREFIX=/home/santhosh/instantclient_12_1 OCI_LIBS="-Wl,-rpath,/home/santhosh/instantclient_12_1/lib -lclntsh -lnnz12"
    

    But ld returns following errors in config.log.

    loaded result for library config.sqldrivers.libraries.oci
    Trying source 0 (type inline) of library oci ...
      => source failed condition 'config.win32'.
    Trying source 1 (type inline) of library oci ...
    + cd /usr/local/Qt5.12.9/5.12.9/Src/qtbase/src/plugins/sqldrivers/config.tests/oci && /usr/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'QMAKE_USE += oci' 'QMAKE_LIBS_OCI = -L/home/santhosh/instantclient_12_1/lib -lclntsh' 'QMAKE_INCDIR_OCI = /home/santhosh/instantclient_12_1/include' /usr/local/Qt5.12.9/5.12.9/Src/qtbase/src/plugins/sqldrivers/config.tests/oci
    > Info: creating stash file /usr/local/Qt5.12.9/5.12.9/Src/qtbase/src/plugins/sqldrivers/config.tests/.qmake.stash
    + cd /usr/local/Qt5.12.9/5.12.9/Src/qtbase/src/plugins/sqldrivers/config.tests/oci && MAKEFLAGS= make
    > g++ -c -pipe -O2 -w -fPIC  -I. -I/home/santhosh/instantclient_12_1/include -I/usr/lib/qt/mkspecs/linux-g++ -o main.o main.cpp
    > g++ -Wl,-O1 -o oci main.o   -L/home/santhosh/instantclient_12_1/lib -lclntsh   
    > /usr/bin/ld: warning: libmql1.so, needed by /home/santhosh/instantclient_12_1/lib/libclntsh.so, not found (try using -rpath or -rpath-link)
    > /usr/bin/ld: warning: libipc1.so, needed by /home/santhosh/instantclient_12_1/lib/libclntsh.so, not found (try using -rpath or -rpath-link)
    > /usr/bin/ld: warning: libnnz12.so, needed by /home/santhosh/instantclient_12_1/lib/libclntsh.so, not found (try using -rpath or -rpath-link)
    > /usr/bin/ld: warning: libons.so, needed by /home/santhosh/instantclient_12_1/lib/libclntsh.so, not found (try using -rpath or -rpath-link)
    > /usr/bin/ld: warning: libclntshcore.so.12.1, needed by /home/santhosh/instantclient_12_1/lib/libclntsh.so, not found (try using -rpath or -rpath-link)
    > /usr/bin/ld: /home/santhosh/instantclient_12_1/lib/libclntsh.so: undefined reference to `LdiDateCheck'
    > /usr/bin/ld: /home/santhosh/instantclient_12_1/lib/libclntsh.so: undefined reference to `OraMemInit'
    > /usr/bin/ld: /home/santhosh/instantclient_12_1/lib/libclntsh.so: undefined reference to `lxkRegexpCountLob'
    > /usr/bin/ld: /home/santhosh/instantclient_12_1/lib/libclntsh.so: undefined reference to `lxmdigx'
    > /usr/bin/ld: /home/santhosh/instantclient_12_1/lib/libclntsh.so: undefined reference to `ztchi'
    > /usr/bin/ld: /home/santhosh/instantclient_12_1/lib/libclntsh.so: undefined reference to `sltsmxi'
    > /usr/bin/ld: /home/santhosh/instantclient_12_1/lib/libclntsh.so: undefined reference to `ons_shutdown_wtimeout_ctx'
    > /usr/bin/ld: /home/santhosh/instantclient_12_1/lib/libclntsh.so: undefined reference to `lxhebc'
    > /usr/bin/ld: /home/santhosh/instantclient_12_1/lib/libclntsh.so: undefined reference to `LhtStrSearch'
    

    But the ld's warning as missing files (libmql1.so, libipc1.so, libnnz12.so, libons.so, and libclntshcore.so.12.1) are in the directory /home/santhosh/instantclient_12_1/lib as mentioned in the -rpath.
    Am I missing anything here? How can I purely enable QOCI in my Qt Creator?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SanthoshPSK
      wrote on last edited by
      #2

      I somewhat found a solution for this. It was a cache issue. For the first time, my qmake command was failed due to the fact that I didn't include the -rpath. The command I used for that is somewhere cached and subsequently, whenever I run correct qmake command with -rpath option, it was not taking my options and taking all options from the first failed command cached somewhere.

      rm -rf ./config.tests
      rm -f ./config.cache
      

      cleared those caches like above and executed the command said in question again, it started working now.

      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