Ahas
19th May 2011, 16:02
Hi,
When compiling Qt static on windows 7 with mysql I get undefined refrences errors like:
c:\Qt\4.7.3-static\lib/libQtSql.a(qsql_mysql.o):qsql_mysql.cpp:(.text+0x4 7ae): undefined reference to `mysql_stmt_attr_set@12'
I found out that "mysql_stmt_attr_set" is a function of mysql.
So in the file qsql_mysql.cpp there are a lot of mysql-functions used that all give an undefined reference error.
I configured Qt like this:
configure -release -opensource -static -L C:\mysql\lib\opt -L C:\mysql\lib -I C:\mysql\include -nomake examples -nomake demos -no-exceptions -no-stl -no-rtti -no-qt3support -no-scripttools -no-openssl -no-opengl -webkit -qt-sql-mysql -platform win32-g++ -qt-zlib -qt-gif -qt-libpng -qt-libtiff -qt-libjpeg
C:\mysql\lib\opt, C:\mysql\lib and C:\mysql\include is where all the mysql libs and includes are.
Is there something wrong with the configure statement? Does it not find all the neccessary mysql includes or libs?
Can somebody please help, or point me in the right direction?
Thanks.
When compiling Qt static on windows 7 with mysql I get undefined refrences errors like:
c:\Qt\4.7.3-static\lib/libQtSql.a(qsql_mysql.o):qsql_mysql.cpp:(.text+0x4 7ae): undefined reference to `mysql_stmt_attr_set@12'
I found out that "mysql_stmt_attr_set" is a function of mysql.
So in the file qsql_mysql.cpp there are a lot of mysql-functions used that all give an undefined reference error.
I configured Qt like this:
configure -release -opensource -static -L C:\mysql\lib\opt -L C:\mysql\lib -I C:\mysql\include -nomake examples -nomake demos -no-exceptions -no-stl -no-rtti -no-qt3support -no-scripttools -no-openssl -no-opengl -webkit -qt-sql-mysql -platform win32-g++ -qt-zlib -qt-gif -qt-libpng -qt-libtiff -qt-libjpeg
C:\mysql\lib\opt, C:\mysql\lib and C:\mysql\include is where all the mysql libs and includes are.
Is there something wrong with the configure statement? Does it not find all the neccessary mysql includes or libs?
Can somebody please help, or point me in the right direction?
Thanks.