This is how i build QMYSQL driver with MinGW/GCC.
1. create directory C:\mysql, C:\mysql\include, and C:\mysql\lib
2. copy mysql headers(*.h) to C:\mysql\include
3. copy libmysql.lib to C:\mysql\lib
4. use command prompt and change directory to C:\mysql\lib and run :
> reimp -d libmysql.lib
> dlltool -d libmysql.def -D libmysql.dll -l libmysql.a -k
5. change directory to mysql driver plugin(for example C:\Qt\2010.03\qt\src\plugins\sqldrivers\mysql) and run:
> qmake "INCLUDEPATH+=C:\mysql\include" "LIBS+=-LC:\mysql\lib -lmysql" mysql.pro
> mingw32-make all
Bookmarks