How to build the QMYSQL plugin under Windows using MinGW

I have installed QT4.6.3(2010.04, install path is D:\Qt\2010.04), and want to integrate mysql support into my new project, so I need to build qmysql plugin first.
prepare job,
download mysql-noinstall-5.1.49-win32.zip and unzip to D:\basetool\MySQL-5.1.49-win32
download mingw-utils-0.3 and unzip to D:\Qt\2010.04\mingw\bin

run Qt Command Prompt, and execute the following script
cd D:\basetool\MySQL-5.1.49-win32\lib\opt
reimp -d libmysql.lib
dlltool -k --input-def LIBMYSQL.def --dllname libmysql.dll --output-lib libmysql.a
copy libmysql.a D:\Qt\2010.04\qt\src\plugins\sqldrivers\mysql
cd D:\Qt\2010.04\qt\src\plugins\sqldrivers\mysql
set MYSQL_PATH=D:\basetool\MySQL-5.1.49-win32\
qmake "INCLUDEPATH+=%MYSQL_PATH%include" "LIBS+=-L. -lmysql" mysql.pro
mingw32-make
copy D:\basetool\MySQL-5.1.49-win32\lib\opt\libmysql.dll D:\Qt\2010.04\mingw\bin

Test the demo sqlbrowser(in the D:\Qt\2010.04\qt\demos\sqlbrowser), and works.

P.S.
first time I downloaded mingw-utils-0.4-1, and when run the command “reimp -d libmysql.lib”,I got the error message
reimp: libmysql.lib: invalid or corrupt import library
after search , I knew, have to use mingw-utils-0.3, the version 0.4-1 does not work and report the error message.

Be Sociable, Share!

WordPress Runs on Google Application Engine

In the article, Let Google App Engine Support PHP, we know with the help of Quercus, we can run PHP application on Google Applications Engline(GAE), but how about run WordPress on GAE?
Wordpress already runs on Resin with Quercus, but GAE does not support mysql, so the rest job is convert mysql to the Goole App Engine’s subset of JPA, for details, please visit Quercus on Google App Engine.

Be Sociable, Share!