Results 1 to 3 of 3

Thread: mysql 5.0.41 and qt 4

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Posts
    38
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default mysql 5.0.41 and qt 4

    I have read the archives trying to find if there is any solution to the problem i have been having

    Have seen a couple of related cases but nothing of this kind

    I am trying to build the mysql plugin using

    qmake -o Makefile "INCLUDEPATH+=D:\MYSQLserver\include" "LIBS+=D:\MYSQLserver\lib\opt\libmysql.lib" mysql.pro
    nmake
    at the qt4 command prompt. I keep getting the following error, and i don not know how to resolve it:

    link /LIBPATH:"d:\Qt\4.2.0\lib" /LIBPATH:"d:\Qt\4.2.0\lib" /NOLOGO /DEBU
    G /DEBUG /DLL /OUT:..\..\..\..\plugins\sqldrivers\qsqlmysqld.dll @C:\DOCUME~1\KE
    ITHB~1\LOCALS~1\Temp\nm39A.tmp
    LINK : fatal error LNK1104: cannot open file 'D:\MYSQL\lib\opt\libmysql.lib.lib'

    NMAKE : fatal error U1077: 'link' : return code '0x450'
    Stop.
    NMAKE : fatal error U1077: '"D:\Program Files\Microsoft Visual Studio .NET 2003\
    VC7\BIN\nmake.exe"' : return code '0x2'

    the error basically concerns not being able to find libmysql.lib.lib:
    error LNK:1104 libmsql.lib.lib

    could some one please help me with this

    all suggestions welcomed

    thanks in advance

    forgot to mention that i am using windows, also when i try the peice of code:

    Qt Code:
    1. #include <QCoreApplication>
    2. #include <QSqlDatabase>
    3. #include <QSqlError>
    4. #include <QStringList>
    5. #include <QtDebug>
    6.  
    7. int main( int argc, char **argv )
    8. {
    9. QCoreApplication app( argc, argv );
    10. qDebug() << QSqlDatabase::drivers();
    11. QSqlDatabase db( QSqlDatabase::addDatabase( "QMYSQL" ) );
    12. qDebug() << db.lastError();
    13. }
    To copy to clipboard, switch view to plain text mode 

    i get the output:

    ("QSQLITE", "QODBC3", "QODBC", "QPSQL7", "QPSQL")
    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC QPSQL7 QPSQL
    QSqlError(-1, "Driver not loaded", "Driver not loaded")
    Press any key to continue
    Last edited by locus; 19th June 2007 at 23:38.

Similar Threads

  1. Qt 4.2.3 with MSVC 2005 and MySQL
    By whitefurrows in forum Qt Programming
    Replies: 4
    Last Post: 3rd May 2007, 16:32
  2. MySQL starting problem
    By shamik in forum General Discussion
    Replies: 5
    Last Post: 25th April 2007, 07:20
  3. Mysql LD_LIBRARY_PATH Issue
    By Think_Positive in forum Installation and Deployment
    Replies: 3
    Last Post: 13th February 2007, 19:16
  4. Qt 4.1.4 & Mysql 5 on Linux x64
    By bothapn in forum Installation and Deployment
    Replies: 7
    Last Post: 4th August 2006, 13: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
  •  
Qt is a trademark of The Qt Company.