Results 1 to 3 of 3

Thread: mysql 5.0.41 and qt 4

  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.

  2. #2
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: mysql 5.0.41 and qt 4

    Quote Originally Posted by locus View Post
    I have read the archives trying to find if there is any solution to the
    i get the output:
    libmysql.lib.lib so much lib is this VS Microsoft compiler?

    Last sunday i build MAC QT4.4 static to give apps on friends qt-mac-opensource-src-4.4.0-snapshot-20070608.tar.bz2

    I have put inside on qt4... build ..

    Qt Code:
    1. ./configure -qt-zlib -qt-libtiff -no-qt3support \
    2. -qt-sql-mysql -qt-sql-odbc -qt-sql-sqlite -qt-gif -qt-libpng -qt-libjpeg \
    3. -I /usr/local/mysql2arch/include/mysql -L /usr/local/mysql2arch/lib/mysql -lmysqlclient_r \
    4. -universal -sdk /Developer/SDKs/MacOSX10.4u.sdk -static -release -confirm-license
    To copy to clipboard, switch view to plain text mode 

    I suppose MS can make the same job..


    Now i never load plug-in .. now mysql is inside QSql mudule...

  3. #3
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: mysql 5.0.41 and qt 4

    Don't pass the complete libname to configure.exe - just the path (or maybe the path + file without extension)

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