PDA

View Full Version : Deployment of QT4 App that uses the MySql driver



kroenecker
19th June 2006, 17:35
I'm trying to deploy a small application in my office to windows machines that don't have QT installed. The application runs fine as I've included all necessary dll files in the same folder as the app itself.

Unfortunately, my app can't find the mysql driver. This isn't a static build of QT. Where do I need to put the qsqlmysql.dll in order for my application to work fully? Do I need to include the libmysql.dll as well? If so, where?

jacek
19th June 2006, 17:58
libmysql.dll should be in the directory where your executable is and qsqlmysql.dll should be in sqldrivers subdirectory (unless you have qt.conf file).

Use Dependency Walker (http://www.dependencywalker.com) to check what other DLLs you need (you can ignore *java*.dll).

kroenecker
19th June 2006, 18:15
jacek,

Thanks for the reply. I've got it working now.

I have one more question: accessing the database from other machines is very slow. Could you (or anyone with some ideas) provide me with some suggestions that would help me speed up database access?

I'm currently using MySql and I've set it up to be used on a "server" machine.

jacek
19th June 2006, 18:26
I don't use MySQL, so I can't help you with it, but first you should check how much data do you pass between client and the server. In PostgreSQL you can log all queries to see how often they're issued --- maybe it's possible also in MySQL. Can your network handle such amount of traffic?

patrik08
20th June 2006, 09:37
Where do I need to put the qsqlmysql.dll in order for my application to work fully? Do I need to include the libmysql.dll as well? If so, where?

Same I am not never successful to make to work mysql on window whit qt4...
Only on mac i have compiled a mysql connecction...

IMO
I suggest you to use on window:
1- ODBC.. from qt ... run at first compile ... and you can attach moore types of database.... mysq to..
2- If the mysql is remote (slow...) use sqlite3 from qt4 or a staticlibs..
svn co http://ciz.ch/svnciz/_STATIC_LIBS_QT4/lib_sqlite_qt4/ libx , to work localy fast on db ... and update remote on various port or simple port 80 on cron job , realtime, webdav...... (mysql replace command)


And troubles vanish....

e8johan
20th June 2006, 09:52
These are not Qt4 specifics, but might be helpful:

http://doc.trolltech.com/qq/qq10-windows-deployment.html
http://doc.trolltech.com/qq/qq11-unix-deployment.html
http://doc.trolltech.com/qq/qq09-mac-deployment.html

Also, the Q_IMPORT_PLUGIN (http://doc.trolltech.com/4.1/qtplugin.html#Q_IMPORT_PLUGIN) macro might help.