Results 1 to 11 of 11

Thread: How to compile the odbc drivers?

  1. #1
    Join Date
    Oct 2009
    Posts
    22
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Angry How to compile the odbc drivers?

    I want to compile odbc drivers for qt,But give me some errors.
    step 1:
    Open the Visual Studio command prompt and cd the directory of "C:\Qt\4.6.0-msvc\src\plugins\sqldrivers\odbc".
    step 2:
    do qmake
    step 3:
    do nmake.

    In the step 3,give some errors.
    [ LINK : fatal error LNK1104: can't open file“..\..\..\..\plugins\sqldrivers\qsqlodb
    cd.lib”
    NMAKE : fatal error U1077: “"C:\Program Files\Microsoft Visual Studio 9.0\VC\BI
    N\link.EXE"”: return “0x450”
    Stop.
    NMAKE : fatal error U1077: “"C:\Program Files\Microsoft Visual Studio 9.0\VC\BI
    N\nmake.exe"”: return “0x2”
    Stop.]

    When i add path of "C:\Qt\4.6.0-msvc\plugins\sqldrivers" .
    give this errors
    [ link /LIBPATH:"c:\Qt\4.6.0-msvc\lib" /LIBPATH:"c:\Qt\4.6.0-msvc\lib" /NO
    LOGO /DEBUG /MANIFEST /MANIFESTFILE:"tmp\obj\debug_shared\qsqlodbcd.inter mediate
    .manifest" /VERSION:4.60 /OUT:..\..\..\..\plugins\sqldrivers\qsqlodbcd.lib @C:\D
    OCUME~1\ADMINI~1\LOCALS~1\Temp\nm238.tmp
    NMAKE : fatal error U1077: “"C:\Program Files\Microsoft Visual Studio 9.0\VC\BI
    N\link.EXE"”: return “0xc0000135”
    Stop.
    NMAKE : fatal error U1077: “"C:\Program Files\Microsoft Visual Studio 9.0\VC\BI
    N\nmake.exe"”: return “0x2”]

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to compile the odbc drivers?

    you should specify path for includes and libs and then build plugin.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Oct 2009
    Posts
    22
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Talking Re: How to compile the odbc drivers?

    Thanks,i will make attempt immediately.

  4. #4
    Join Date
    Oct 2009
    Posts
    22
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy Re: How to compile the odbc drivers?

    I add some directory to the path,but it Still failed.
    eg:
    path “C:\Qt\4.6.0-msvc\src\sql\drivers\odbc” %path%
    path “C:\Qt\4.6.0-msvc\src\plugins\sqldrivers\odbc” %path%
    path “C:\Qt\4.6.0-msvc\lib” %path%
    path “C:\Qt\4.6.0-msvc\include” %path%
    What‘s path or directory need to be add?Or,How do it? Thanks !
    Last edited by rainspider; 11th November 2009 at 13:53.

  5. #5
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to compile the odbc drivers?

    the settings should look like this
    @SET QTDIR=D:\develop\qt-4.5.2-vs2008
    @SET QMAKESPEC=win32-msvc2008

    @SET PATH=%QTDIR%\bin;%PATH%
    @SET INCLUDE=%QTDIR%\include;%INCLUDE%
    @SET LIB=%QTDIR%\lib;%LIB%
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  6. The following user says thank you to spirit for this useful post:

    rainspider (11th November 2009)

  7. #6
    Join Date
    Oct 2009
    Posts
    22
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to compile the odbc drivers?

    I'm very sorry.It can't still field.
    the step is:
    1.Open cmd
    2.Do the command of list:
    cd C:\Qt\4.6.0-msvc\src\plugins\sqldrivers\odbc

    %comspec% /k ""C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86
    @SET QTDIR=C:\Qt\4.6.0-msvc
    @SET QMAKESPEC=win32-msvc2008

    @SET PATH=%QTDIR%\bin;%PATH%
    @SET INCLUDE=%QTDIR%\include;%INCLUDE%
    @SET LIB=%QTDIR%\lib;%LIB%

    @SET LIB=%QTDIR%\plugins\sqldrivers;%LIB%

    @SET INCLUDE=%QTDIR%\src\sql\drivers\odbc;%INCLUDE%
    @SET INCLUDE=%QTDIR%\src\sql\kernel;%INCLUDE%
    @SET INCLUDE=%QTDIR%\src\plugins\sqldrivers\odbc;%INCLU DE%
    3.qmake
    4.nmake
    [you should specify path for includes and libs and then build plugin.]
    Can you tell me what's path need to be add?

  8. #7
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to compile the odbc drivers?

    these variables should be enough:
    @SET QTDIR=C:\Qt\4.6.0-msvc
    @SET QMAKESPEC=win32-msvc2008

    @SET PATH=%QTDIR%\bin;%PATH%
    @SET INCLUDE=%QTDIR%\include;%INCLUDE%
    @SET LIB=%QTDIR%\lib;%LIB%
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  9. #8
    Join Date
    Oct 2009
    Posts
    22
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to compile the odbc drivers?

    @SET QTDIR=C:\Qt\4.6.0-msvc
    @SET QMAKESPEC=win32-msvc2008

    @SET PATH=%QTDIR%\bin;%PATH%
    @SET INCLUDE=%QTDIR%\include;%INCLUDE%
    @SET LIB=%QTDIR%\lib;%LIB%

    C:\Qt\4.6.0-msvc\src\plugins\sqldrivers\odbc>qmake

    C:\Qt\4.6.0-msvc\src\plugins\sqldrivers\odbc>nmake

    "C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" -f Makef
    ile.Debug all

    link /LIBPATH:"c:\Qt\4.6.0-msvc\lib" /LIBPATH:"c:\Qt\4.6.0-msvc\lib" /NO
    LOGO /DEBUG /MANIFEST /MANIFESTFILE:"tmp\obj\debug_shared\qsqlodbcd.inter mediate
    .manifest" /VERSION:4.60 /OUT:..\..\..\..\plugins\sqldrivers\qsqlodbcd.lib @C:\D
    OCUME~1\ADMINI~1\LOCALS~1\Temp\nm380.tmp
    Creating library ..\..\..\..\plugins\sqldrivers\qsqlodbcd.lib and Object ..\..\..\..\pl
    ugins\sqldrivers\qsqlodbcd.exp
    LINK : fatal error LNK1104: Can‘t open fiel “..\..\..\..\plugins\sqldrivers\qsqlodb
    cd.lib”
    NMAKE : fatal error U1077: “"C:\Program Files\Microsoft Visual Studio 9.0\VC\BI
    N\link.EXE"”: return “0x450”
    Stop.
    NMAKE : fatal error U1077: “"C:\Program Files\Microsoft Visual Studio 9.0\VC\BI
    N\nmake.exe"”: return “0x2”
    Stop.

    C:\Qt\4.6.0-msvc\src\plugins\sqldrivers\odbc>

    Can you tell me what's wrong,Please.

  10. #9
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to compile the odbc drivers?

    do next
    nmake clean
    qmake
    nmake
    in directory with plugin.
    btw, did you compile Qt by yourself or you just installed it from exe-file?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  11. #10
    Join Date
    Oct 2009
    Posts
    22
    Thanks
    8
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Smile Re: How to compile the odbc drivers?

    My Qt is compiled from Opensource code-package.And use this configuration:
    configure -debug-and-release -platform win32-msvc2008 -no-qt3support -no-openssl -no-phonon -webkit -opensource -nomake demos -nomake examples
    I Found that has not compiled sql driver for ODBC,Only sql driver for sqlite.
    So I want to compile odbc driver.

    The strange thing is that, it can compiled successfully On my Desktop PC.
    But on my Laptop, it is field.Why?

    Now is midnight In our country.so i must going to sleep.

    Waste your time for my questions,I'm very very sorry!
    Thank you for everything.
    I will retry it tomorrow,Thanks.

  12. #11
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to compile the odbc drivers?

    nmake clean, qmake, nmake in plugin's directory should help.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. ODBC function sequence error
    By joseph in forum Qt Programming
    Replies: 9
    Last Post: 7th November 2014, 12:32
  2. how to compile c++ source file in qtCreator
    By orky7 in forum General Programming
    Replies: 6
    Last Post: 20th March 2009, 06:45
  3. SQL Drivers Distribution
    By kandalf in forum Installation and Deployment
    Replies: 1
    Last Post: 12th January 2009, 09:17
  4. qtgui4.dll error in visual c++ 2005
    By Comptrol in forum Installation and Deployment
    Replies: 33
    Last Post: 19th June 2008, 07:18
  5. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02

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.