I need to use Qt to develop applications to access MySQL on linux systems but I want to setup Qt on windows for now due laptop portability. I will purchase the commercial version of Qt if it works out but I can not get the MySql driver to compile.
I have tried for months (following every tutorial/instructions I could find) to compile Qt with -qt-sql-mysql but no success. Here is the last thing I tried.
I extracted the mingw-utils
I copied the reimp.exe to my MinGW\bin directory
I ran: reimp -d libmysql.lib <all ok>
I ran: dlltool -k -d libmysql.def -l libmysql.a <all ok>
I ran: configure.exe -I C:\mysql\include -L C:\mysql\lib\opt -qt-sql-mysql <all ok>
I get the message: Just run mingw32-make
I ran: mingw32-make <not ok>
It runs for quite a while and throws errors.
Here are the last several lines.
C:/Qt/4.1.1/src/sql/drivers/mysql/qsql_mysql.cpp:1113: undefined reference to `m
ysql_query@8'
./tmp\obj\debug_shared\qsql_mysql.o(.text+0x721e): In function `ZN12QMYSQLDriver
17commitTransactionEv':
C:/Qt/4.1.1/src/sql/drivers/mysql/qsql_mysql.cpp:1130: undefined reference to `m
ysql_query@8'
./tmp\obj\debug_shared\qsql_mysql.o(.text+0x73d8): In function `ZN12QMYSQLDriver
19rollbackTransactionEv':
C:/Qt/4.1.1/src/sql/drivers/mysql/qsql_mysql.cpp:1147: undefined reference to `m
ysql_query@8'
./tmp\obj\debug_shared\qsql_mysql.o(.text+0x78b2): In function `ZNK12QMYSQLDrive
r11formatValueERK9QSqlFieldb':
C:/Qt/4.1.1/src/sql/drivers/mysql/qsql_mysql.cpp:1172: undefined reference to `m
ysql_escape_string@12'
collect2: ld returned 1 exit status
mingw32-make[3]: *** [..\..\lib\QtSqld4.dll] Error 1
mingw32-make[3]: Leaving directory `C:/Qt/4.1.1/src/sql'
mingw32-make[2]: *** [debug-all] Error 2
mingw32-make[2]: Leaving directory `C:/Qt/4.1.1/src/sql'
mingw32-make[1]: *** [sub-sql-make_default-ordered] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/4.1.1/src'
mingw32-make: *** [sub-src-make_default-ordered] Error 2

Suggestions?