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. Building OCI plugin on Windows
QtWS25 Last Chance

Building OCI plugin on Windows

Scheduled Pinned Locked Moved Solved General and Desktop
ociqoci
3 Posts 2 Posters 2.1k 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.
  • dream_captainD Offline
    dream_captainD Offline
    dream_captain
    wrote on last edited by dream_captain
    #1

    Hi, i'm trying to build a QOCI plugin with Qt 5.11.2 x32bit according to this guide http://doc.qt.io/qt-5/sql-driver.html#how-to-build-the-oci-plugin-on-windows

    Steps i've taken:

    1. Installed msvc2015 build tools

    2. Downloaded and unpacked Oracle instantclient-basic-nt-12.2.0.1.0.zip and instantclient-sdk-nt-12.2.0.1.0.zip

    3. Set path variables:
      ORACLE_HOME=C:\instantclient_12_2
      added to PATH: E:\QtOnline\5.11.2\msvc2015\bin; C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

    4. cd E:\QtOnline\5.11.2\Src\qtbase\src\plugins\sqldrivers

    5. Ran qmake

    qmake -- OCI_INCDIR=C:\instantclient_12_2\sdk\include OCI_LIBDIR=C:\instantclient_12_2\sdk\lib\msvc
    

    OR

    E:\QtOnline\5.11.2\msvc2015\bin\qmake.exe -- OCI_INCDIR="C:\instantclient_12_2\sdk\include" OCI_LIBDIR="C:\instantclient_12_2\sdk\lib\msvc"
    

    Configure summary:
    Qt Sql:
    DB2 (IBM) .............................. no
    InterBase .............................. no
    MySql .................................. no
    OCI (Oracle) ........................... no
    ODBC ................................... no
    PostgreSQL ............................. no
    SQLite2 ................................ no
    SQLite ................................. yes
    Using system provided SQLite ......... no
    TDS (Sybase) ........................... no

    config.log contains these lines:

    looking for library oci
    Trying source 0 (type inline) of library oci ...
    + cd /d E:\QtOnline\5.11.2\Src\qtbase\src\plugins\sqldrivers\config.tests\oci && E:\QtOnline\5.11.2\msvc2015\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_LIBDIR += C:\\opensslx86\\lib C:\\Utils\\my_sql\\mysql-5.6.11-win32\\lib C:\\Utils\\postgresqlx86\\pgsql\\lib" "INCLUDEPATH += C:\\opensslx86\\include C:\\Utils\\my_sql\\mysql-5.6.11-win32\\include C:\\Utils\\postgresqlx86\\pgsql\\include" "LIBS += -loci" E:/QtOnline/5.11.2/Src/qtbase/src/plugins/sqldrivers/config.tests/oci
    + cd /d E:\QtOnline\5.11.2\Src\qtbase\src\plugins\sqldrivers\config.tests\oci && set MAKEFLAGS=& nmake
    > Microsoft (R) Program Maintenance Utility Version 14.00.24234.1
    > Copyright (C) Microsoft Corporation.  All rights reserved.
    > 	cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W0 -EHsc -DUNICODE -D_UNICODE -DWIN32 -DNDEBUG -I. -IC:\opensslx86\include -IC:\Utils\my_sql\mysql-5.6.11-win32\include -IC:\Utils\postgresqlx86\pgsql\include -IE:\QtOnline\5.11.2\msvc2015\mkspecs\win32-msvc -Fo @C:\Users\sp\AppData\Local\Temp\nmD757.tmp
    > main.cpp
    > .\main.cpp(2): fatal error C1083: Cannot open include file: 'oci.h': No such file or directory
    > NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.EXE"' : return code '0x2'
    > Stop.
     => source failed verification.
    Trying source 1 (type inline) of library oci ...
      => source failed condition '!config.win32'.
    test config.sqldrivers.libraries.oci FAILED
    

    It's confusing because the file is located in C:\instantclient_12_2\sdk\include. Seems like flags OCI_INCDIR and OCI_LIBDIR are not used by qmake correctly.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Did you try to use forward slashes for OCI_INCDIR and OCI_LIBDIR? And please don't quote the paths:

      qmake.exe -- OCI_INCDIR=C:/instantclient_12_2/sdk/include OCI_LIBDIR=C:/instantclient_12_2/sdk/lib/msvc

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      dream_captainD 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        Did you try to use forward slashes for OCI_INCDIR and OCI_LIBDIR? And please don't quote the paths:

        qmake.exe -- OCI_INCDIR=C:/instantclient_12_2/sdk/include OCI_LIBDIR=C:/instantclient_12_2/sdk/lib/msvc

        dream_captainD Offline
        dream_captainD Offline
        dream_captain
        wrote on last edited by
        #3

        @Christian-Ehrlicher
        Thanks for reply.

        After some hours of trying , I finally managed to make a progress, but then got stuck in the linkage stage.

        I decided to give up and downgraded to Qt 5.9.7. QOCI plugin compiled out of the box without any problems.

        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