Results 1 to 6 of 6

Thread: "cannot find -lqsqlodbc" error while compiling the qt application statically....

  1. #1
    Join Date
    Feb 2010
    Posts
    28
    Qt products
    Qt4
    Platforms
    Windows

    Question "cannot find -lqsqlodbc" error while compiling the qt application statically....

    Hi Friends,

    i am getting the following errors while compiling my application statically...

    errors:
    1."cannot find -lqsqlodbc"
    2.collect2:ld returned 1 exit status

    please see the attachments...

    i think the meaning of the above error is "-lqsqlodbc" library is not finding and include...

    can anyone please help me to solve this problem..

    i am using Qt 4.7.0 and Qwt 6.0.0 and QODBC database driver for my application...
    and it was developed under windows xp platform...

    any suggestions are highly appriciated

    Thanks,
    mammaiap
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: "cannot find -lqsqlodbc" error while compiling the qt application statically....

    Did you build the static odbc driver plugin when building Qt?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Feb 2010
    Posts
    28
    Qt products
    Qt4
    Platforms
    Windows

    Exclamation Re: "cannot find -lqsqlodbc" error while compiling the qt application statically....

    Hi Wysota,
    Thanks for your reply..

    yes.. i build the odbc driver plugin statically when building Qt... after the static building it generates the "libqsqlodbc.a" file with 146KB in the "C:\Qt-4.7.0-Static\2010.05\qt\plugins\sqldrivers" directory...

    is it OK? or is there any other files need to be generate along with "libqsqlodbc.a" file?

    after that i slightly modified the *.pro and main.cpp ... please see the attachments...

    now i got only one error : "collect2:ld returned 1 exit status"

    and attached see the below compiler output ........

    please help me to fix this problem..

    Thanks,
    mammaiap
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: "cannot find -lqsqlodbc" error while compiling the qt application statically....

    Do you have ODBC libraries installed on your system? The plugin requires them.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Feb 2010
    Posts
    28
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: "cannot find -lqsqlodbc" error while compiling the qt application statically....

    Hi Wysota,

    i have installed the "Microsoft SQL Server 2005" on my system... and i have done the system DSN for SQL server....

    i dont know what you mean by "ODBC libraries installed"?.....

    and one more thing there is no problem with dynamic linking ..... i can able to generate the *.exe and exe is working fine as per the expectation...

    the only problem i am facing with "static linking"...

    Thanks,
    mammaiap

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: "cannot find -lqsqlodbc" error while compiling the qt application statically....

    The missing symbols (such as this one: http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx) are from ODBC libraries the plugin needs to link against. It seems you are missing some development files for ODBC, maybe a static odbc library is required.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 32
    Last Post: 26th August 2012, 00:10
  2. Replies: 4
    Last Post: 20th September 2010, 11:42
  3. The compiler error:"cannot find -lQtGuid4"
    By osmanthus in forum Installation and Deployment
    Replies: 1
    Last Post: 7th January 2009, 07:58
  4. "Treat wchar_t as Built-in Type" to "yes" link error
    By sungaoyong in forum Qt Programming
    Replies: 1
    Last Post: 5th June 2008, 12:45
  5. QFile Problem~ "Unknow error" in "open(QIODevice::ReadWrite)"
    By fengtian.we in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2007, 16:58

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.