views:

1283

answers:

1

I'm building a MySQL plugin for Qt 4.4.3 Open Source Edition (Qt documentation), and using command:

cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\MySQL Server <version>\lib\opt\libmysql.lib" mysql.pro
make

I manage to build it to my 64-bit Qt just fine using 64-bit MySQL dev files (using nmake). However, 32-bit build (with mingw-make) fails with linking problems:

Creating library file: c:\Coding\Qt\4.4.3\plugins\sqldrivers\libqsqlmysqld4.a
tmp/obj/debug_shared/qsql_mysql.o(.text+0x10d): In function `Z5codecP8st_mysql':
...lots of same stuff...

The dev files installed by MySQL 5.1 32-bit and 64-bit library are also different: the 64-bit includes libmysql.dll and six .lib files, while 32-bit includes those plus six .pdb files. Relevant to this issue?

Is anyone able to build the 32-bit plugin with Qt 4.4.3/MinGW using MySQL 5.1? Suggestions?

+1  A: 

use mysql-noinstall-5.1.14-beta-win32

Thanks. I figured out it must've been the mysql package which was wrong, but apparently the new build is fixed. Thanks for testing it out.
Tuminoid