Results 1 to 4 of 4

Thread: Oracle Call Interface (OCI) driver problems

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jul 2010
    Location
    Tampere, Finland
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: Oracle Call Interface (OCI) driver problems

    (I'm running on Win XP SP3 by the way)

    Everything seemed to lead me to a dead-end, so I did the following:

    I uninstalled everything that had anything to do with Qt and Oracle

    I got the Oracle Database 10g Express Client from http://www.oracle.com/technetwork/da...ft-090667.html and installed it to its default path C:\XEClient

    I got Qt SDK 1.1.1 (offline installer) from http://qt.nokia.com/downloads and made a custom installation. From the components I checked Documentation, Qt Examples, MinGW 4.4, Qt Designer, Desktop Qt 4.7.3 - MINGW and Qt Linguist. I installed it to its default path of C:\QtSDK

    Just to make sure (don't know excactly why) I reinstalled also Microsoft Visual C++ 2010 Express http://www.microsoft.com/express/Dow...010-Visual-CPP

    Then when everything was (re)installed, I started the Maintain Qt SDK tool found from the Start menu or through Qt Creator (Help - Start updater). From there (from Package manager tab) I checked under Miscellaneous - Qt Sources the Qt 4.7.3 Sources component.

    Then I set the environment variables (right click my computer - properties - advanced - environment variables) and added there LIB with value C:\XEClient\oci\lib\msvc and INCLUDE with value C:\XEClient\oci\include

    After this I ran the Qt 4.7.3 for Desktop (MinGW) command prompt from the start menu and I wrote in the following
    Qt Code:
    1. set QTDIR=C:\QtSDK\QtSources\4.7.3
    2. cd %QTDIR%\src\plugins\sqldrivers\oci
    3. qmake oci.pro
    To copy to clipboard, switch view to plain text mode 

    If I recall correctly everything worked fine until this point. Then I tried to run nmake but then I got an error that C:\QtSDK\Desktop\Qt\4.7.3\mingw\include\QtSql directory was missing a file, private\qsqlcachedresult_p.h so I searched for that file and I found it from C:\QtSDK\QtSources\4.7.3\src\sql\kernel directory, so I created a the missing directory C:\QtSDK\Desktop\Qt\4.7.3\mingw\include\QtSql\priv ate and copied the qsqlcachedresult_p.h there.

    After that I tried to run nmake again but it still puked on my face, complaining about missing oci.h file. So I manually edited Makefile.release and Makefile.debug files in %QTDIR%\src\plugins\sqldrivers\oci. I added there in the INCPATH section the following: -I"C:\XEClient\oci\include"

    Now I everything should be ready to run
    Qt Code:
    1. nmake
    To copy to clipboard, switch view to plain text mode 

    FINALLY after that nmake didn't complain about anything and it made the following files in the %QTDIR%\src\plugins\sqldrivers\oci\debug directory:
    • libsqlocid4.a
    • main.o
    • moc_qsql_oci.cpp
    • moc_qsql_oci.o
    • qsql_oci.o
    • qsqlocid3.dll
    • qsqlocid_resource_res.o

    After that I ran
    Qt Code:
    1. nmake release
    To copy to clipboard, switch view to plain text mode 
    which gave me the following files to %QTDIR%\src\plugins\sqldrivers\oci\release directory:
    • libsqloci4.a
    • main.o
    • moc_qsql_oci.o
    • qsql_oci.o
    • qsqloci4.dll
    • qsqloci_resource_res.o


    So now I should have the OCI plugin. According to my notions, the .a and .dll files from both debug and release folders should be copied to C:\QtSDK\Desktop\Qt\4.7.3\mingw\plugins\sqldrivers directory

    This way when I run my build in Debug or Release mode the code
    Qt Code:
    1. qDebug() << QSqlDatabase::drivers();
    To copy to clipboard, switch view to plain text mode 
    Shows in debug screen that I have QOCI and QOCI8 available.

    HOWEVER. I am now getting the following error when I try to use
    Qt Code:
    1. QSqlDatabase::addDatabase("QOCI")
    To copy to clipboard, switch view to plain text mode 

    QObject::moveToThread: Current thread (0x3e5448) is not the object's thread (0xa17de28).
    Cannot move to target thread (0x3e5448)


    Now, is there anyone who could tell what is wrong here?
    Last edited by Ionwind; 31st May 2011 at 11:55. Reason: updated contents

Similar Threads

  1. Problems trying to compile driver firebird
    By estanisgeyer in forum Qt Programming
    Replies: 3
    Last Post: 19th July 2011, 14:22
  2. Replies: 1
    Last Post: 8th October 2010, 11:38
  3. Error compiling oracle oci driver for Qt database
    By NAYZAKAY44 in forum Qt Programming
    Replies: 0
    Last Post: 25th August 2010, 18:13
  4. Compiling oracle oci driver for Qt
    By NAYZAKAY44 in forum Newbie
    Replies: 0
    Last Post: 25th August 2010, 18:11
  5. OCI(oracle)driver adding to plugin
    By jjbabu in forum Qt Programming
    Replies: 0
    Last Post: 22nd April 2009, 12:04

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.