PDA

View Full Version : MySQL Plugin Deployment



Socram
9th October 2009, 08:09
I'm new to QT and am having trouble with the MySQL plugin. I installed QT and MySQL on my development Windows XP machine and was able to build the plugin without issue using this command:

C:\Qt\2009.03\qt\src\plugins\sqldrivers\mysql>configure.exe -platform win32-msvc -debug-and-release -opensource -plugin-sql-mysql -l libmysql -I c:\MySQL5\include -L c:\MySQL5\lib\opt -L C:\MySQL5\lib\debug

I was also able to run my application that uses my QT-enabled DLL that connects to the database from my PC. Now, I'm trying to deploy my DLL and am having no luck.

The client PC is also running Windows XP and does not have the QT or MySQL installed. My deployed files are:

c:/MyApp/

myDll.dll

QtCore4.dll

QtSql4.dll

libmysql.dll

plugins/


sqldrivers/



qsqlmysql4.dll

No matter where I put the qsqlmysql4.dll, I get the following error:

QFactoryLoader::QFactoryLoader() looking at "c:/MyApp/plugins/sqldrivers/qsqlmysql4.dll"
"Cannot load library c:/MyApp/plugins/sqldrivers/qsqlmysql4.dll: The specified module could not be found."
could not load
QSqlDatabase: QMYSQL not loaded
QSqlDatabase: available drivers:

I've messed around with the qt.conf file, but don't really understand what I should be putting in there. I've tried this:

[Path]
Plugins=c:/MyApp/plugins/sqldrivers

Any help would be highly appreciated.

Lesiok
9th October 2009, 14:39
You must share with application DLL's from MySQL. qsqlmysql4.dll is only a bridge from Qt application to real MySQL driver.
PS.
Ooops, I see that You have libmysql.dll. Just use dependency walker (http://www.dependencywalker.com/)