I have the following strange situation here I need some help with:
I am building a Qt application with MySQL access. For this I have:
– a dedicated building machine, using Qt 2010.05 and a MySQL 5.1 just for the libraries, Windows 7 32 bit. This machine creates the install package.
– a dedicated development machine, CentOS 5.5
– two testing machines:
– – an “always” fresh install of Windows 7
– – another Windows 7 machine with a newer Qt on it used for other stuff too.
I have built the previous version of the application sometime in February this year (on the bilding machine), it works nicely and perfectly, loads the MySQL driver (I have put it in the sqldrivers directory as indicated by everyone else). The install package installs, works everywhere (at least on all my Windows machines).
Now, I have built another release of the application, on the same machine. In the install package the only important difference is the executable (and some HTML files, but those are not relevant). Everything else is the same. When I run the NEW executable on the build machine I get (“QSQLITE”, “QMYSQL3”, “QMYSQL”, “QODBC3”, “QODBC”) as the QSqlDatabase::drivers() output. If I run the NEW exectuable on any other machine I get an empty list of drivers. If I run the OLD package on any machine it works…
The loaded modules by the two processess (old executable, new executable) are basically the same, except is the qtmysql DLL which gets loaded in the old one and not in the new.
Have you ever encountered a situation like this? If yes do you have a feasible solution for it?
Thanks,
f.
Qt will only load plugins which are compatible with the program or version of Qt used. See the Deploying Plugins document.
You could also try using
QPluginLoaderto manually load a plugin and check what is reported as theQPluginLoader::errorStringwhen it doesn’t load (add the error message to your question if you can’t fix it still).