Results 1 to 9 of 9

Thread: installing OCI driver

  1. #1
    Join Date
    Apr 2009
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default installing OCI driver

    Hello,

    I'm using Qt Creator 1.0.0 based on Qt 4.5.0 on system: Windows XP Professional ver.2002 service pack 3.
    I've read a lot of stuffs about DB drivers and instalations, but I still have problem with installing the plugins.

    I want to instal OCI driver, which I could use in my applications.

    I've already set the System variables
    INCLUDE = C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\;D:\oracle\product\10.2.0\cl ient_1\oci\include
    and
    LIB = C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\;D:\oracle\product\10.2.0\client _1\oci\lib\msvc
    ,
    also
    QMAKESPEC = win32-msvc.net;win32-msvc
    QTDIR = C:\Qt\2009.01\qt
    PATH = D:\oracle\product\10.2.0\client_1\bin
    .
    When I run qmake in Visual Studio .NET 2003 Command Promt, I receive that 'qmake' is not recognized as an internal or external command, operable program or batch file.

    Then I try ti run qmake, that's in QT Creator. In Compile output I read:
    QMAKESPEC set to win32-msvc.net;win32-msvc overrides mkspec of selected qt win32-g++
    Running build steps for project oci...
    Starting: C:/Qt/2009.01/qt/bin/qmake.exe C:/Qt/2009.01/qt/src/plugins/sqldrivers/oci/oci.pro -spec win32-g++ -r CONFIG+=debug_and_release
    Exited with code 0.
    Please help me what to do?

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: installing OCI driver

    you can not use the qt sdk with visual studio.. you have to compile qt for visual studio from source

    for this error
    'qmake' is not recognized as an internal or external command, operable program or batch file.

    you have to put the QTDIR\bin path to PATH

  3. #3
    Join Date
    Apr 2009
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: installing OCI driver

    I'm using QT Creator for implementing the source code for my applications.
    How to add OCI driver to it, I'm not using Visual Studio.

  4. #4
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: installing OCI driver

    i think the driver is loaded by a simple call to

    QSqlDatabase db = QSqlDatabase::addDatabase("QOCI");

    and remember to at QT+=sql in your .pro file and reload the project.. QtCreator will take care of the rest

  5. #5
    Join Date
    Apr 2009
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: installing OCI driver

    I did it so, but when I try to log to the DB I receive the following error:
    QSqlDatabase: QOCI driver not loaded
    QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC
    So I thought that I should instalL this OCI driver. But I have the previous problems. And I don't know what to do?

  6. #6
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: installing OCI driver

    then you have to compile the OCI driver.
    the is detailed chapter dedicated to plugins and sql drivers in qt assistant. but u must be having oracal includes files for that. i dont know where to find them

  7. #7
    Join Date
    Apr 2009
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: installing OCI driver

    I have problems while trying to install OCI plugin. That was my question - for help where am I making mistake? And I explain all the steps that I've made.
    When I run qmake for 'C:\Qt\2009.01\qt\src\plugins\sqldrivers\oci' it uses '-spec win32-g++'.
    After that I run 'nmake' from Visual Studio .NET 2003 Command Prompt and have errors:
    'g++' is not recognizd as an external command.
    What am I missing?

  8. #8
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: installing OCI driver

    the makefile is ment to be compiled from gcc compiler and NOT the microsoft compiler..

    the qt sdk comes with MinGW compiler... just locate the compiler direcotry.

    now add path\to\mingw\bin to PATH

    open command prompt and cd to OCI plugin

    run make (not nmake)

  9. #9
    Join Date
    Apr 2009
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: installing OCI driver

    Ok, I found MinGW, set PATHs and then run make on command prompt.
    It started. After few minutes I recieved many errors like these:
    C:/Qt/2009.01/qt/src/plugins/sqldrivers/oci/tmp/moc/debug_shared/moc_qsql_oci.cp
    p:41: undefined reference to `_imp___ZN10QSqlDriver16staticMetaObjectE'
    tmp/obj/debug_shared/moc_qsql_oci.o: In function `ZSt17__verify_groupingPKcjRKSs
    ':
    C:/Qt/2009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/b
    its/locale_facets.tcc:2499: undefined reference to `QObject::event(QEvent*)'
    C:/Qt/2009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/b
    its/locale_facets.tcc:2499: undefined reference to `QObject::eventFilter(QObject
    *, QEvent*)'
    C:/Qt/2009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/b
    its/locale_facets.tcc:2499: undefined reference to `QObject::timerEvent(QTimerEv
    ent*)'
    C:/Qt/2009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/b
    its/locale_facets.tcc:2499: undefined reference to `QObject::childEvent(QChildEv
    ent*)'
    C:/Qt/2009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/b
    its/locale_facets.tcc:2499: undefined reference to `QObject::customEvent(QEvent*
    )'
    C:/Qt/2009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/b
    its/locale_facets.tcc:2499: undefined reference to `QObject::connectNotify(char
    const*)'
    C:/Qt/2009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/b
    its/locale_facets.tcc:2500: undefined reference to `QObject::disconnectNotify(ch
    ar const*)'
    C:/Qt/2009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/b
    its/locale_facets.tcc:2500: undefined reference to `QSqlDriver::isOpen() const'
    C:/Qt/2Creating library file: c:\Qt\2009.01\qt\plugins\sqldrivers\libqsqlocid4.a

    009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/loc
    ale_facets.tcc:2507: undefined reference to `QSqlDriver::sqlStatement(QSqlDriver
    ::StatementType, QString const&, QSqlRecord const&, bool) const'
    C:/Qt/2009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/b
    its/locale_facets.tcc:2507: undefined reference to `QSqlDriver::setOpen(bool)'
    C:/Qt/2009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/b
    its/locale_facets.tcc:2506: undefined reference to `QSqlDriver::setOpenError(boo
    l)'
    C:/Qt/2009.01/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/b
    its/locale_facets.tcc:2506: undefined reference to `QSqlDriver::setLastError(QSq
    lError const&)'
    collect2: ld returned 1 exit status
    mingw32-make[1]: *** [..\..\..\..\plugins\sqldrivers\qsqlocid4.dll] Error 1
    mingw32-make[1]: Leaving directory `C:/Qt/2009.01/qt/src/plugins/sqldrivers/oci'

    mingw32-make: *** [debug-all] Error 2
    Why?
    Last edited by dilidpan; 15th June 2009 at 12:52.

Similar Threads

  1. Help with QMYSQL driver for QT 4.4.0: driver not loaded
    By khikho in forum Installation and Deployment
    Replies: 4
    Last Post: 1st April 2011, 15:00
  2. Installing Driver to connect SQL server
    By srinivasj in forum Installation and Deployment
    Replies: 1
    Last Post: 3rd April 2009, 15:39
  3. How do I get Qt to recognize the oci driver.
    By yleesun in forum Qt Programming
    Replies: 11
    Last Post: 19th January 2009, 03:50
  4. Can't find QPSQL driver!!
    By brevleq in forum Qt Programming
    Replies: 9
    Last Post: 30th October 2007, 00:29
  5. regarding a touch screen driver for qt-embedded
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 2nd March 2007, 10:23

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.