PDA

View Full Version : mysql 5.0.41 and qt 4


locus
20th June 2007, 00:29
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:

#include <QCoreApplication>
#include <QSqlDatabase>
#include <QSqlError>
#include <QStringList>
#include <QtDebug>

int main( int argc, char **argv )
{
QCoreApplication app( argc, argv );
qDebug() << QSqlDatabase::drivers();
QSqlDatabase db( QSqlDatabase::addDatabase( "QMYSQL" ) );
qDebug() << db.lastError();
}

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

patrik08
20th June 2007, 02:02
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? :rolleyes:

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 ..


./configure -qt-zlib -qt-libtiff -no-qt3support \
-qt-sql-mysql -qt-sql-odbc -qt-sql-sqlite -qt-gif -qt-libpng -qt-libjpeg \
-I /usr/local/mysql2arch/include/mysql -L /usr/local/mysql2arch/lib/mysql -lmysqlclient_r \
-universal -sdk /Developer/SDKs/MacOSX10.4u.sdk -static -release -confirm-license


I suppose MS can make the same job..


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

ChristianEhrlicher
20th June 2007, 08:08
Don't pass the complete libname to configure.exe - just the path (or maybe the path + file without extension)