PDA

View Full Version : Migrating development XD



chaosgeorge
23rd November 2006, 16:51
Hi, i was progamming at home using mysql plugins, everything works fine at home, now i come to school and i want to use the plugin i built at home, what do i need to do? i have carried with me the qtsqlmysqld.dll (i forgot the other XD) i guees i have to configure and make -plugins Qt to use the mysql plugins isn't it?
thanks

budul
23rd November 2006, 17:02
When i was preparing installation for our customer to use PSQL plugin i had to add to install folder among dependant QtCore.dll, QtGui.dll and QtSql.dll (and maybe what ever else you are using) folder called sqldrivers. Where your plugin should be located. But be aware of other possible dependencies of your mysql driver. E.g. PSQL plugin needs other dlls distributed with client's package of Postgres. But probably i answered different question. :-| I would say that for development it should be enough to put your plugin to plugins folder under QT install dir.

chaosgeorge
23rd November 2006, 17:09
Uhm i make a connection to a remote mysql server so i dont need the server installed in the client do I?

budul
23rd November 2006, 17:15
No no, i've just meant that e.g. PSQL plugin needs some dependant libraries from postrges clients pkg installation. Tool like depends (typically somewhere in VS install folders) should help you here. If this is the case.

jacek
23rd November 2006, 17:17
Uhm i make a connection to a remote mysql server so i dont need the server installed in the client do I?
No you don't, but still you need all of the libraries that QMYSQL plugin uses and you have to place the plugin in the proper subdirectory.

Also you make sure that the plugin was built in the same mode that your application was built. If you have "release" version of your application, you need "release" version of the plugin (the one without "d" in filename).

chaosgeorge
23rd November 2006, 17:22
ok so i need to install mysql libraries dont i ? i only need the sources and add the path to the dependencies? or better placing the dependencies in the executable directory?
thanks

budul
23rd November 2006, 17:29
As you need. It depends on you where you put additional mysql libraries. But ensure that you fulfil all needs of your plugin. And be aware of release/debug mix as Jacek mentioned. Good luck.

jacek
23rd November 2006, 17:40
ok so i need to install mysql libraries dont i ? i only need the sources and add the path to the dependencies? or better placing the dependencies in the executable directory?
IMO the safest way is to copy MySQL DLLs to the same directory where you executable is (note that the QMYSQL plugin itself has to be in a "sqldrivers" subdirectory).

You can use Dependency Walker (http://www.dependencywalker.com) to check what MySQL DLLs that plugin needs, but beware that it might require more DLLs, as these can be loaded in the runtime.

chaosgeorge
23rd November 2006, 17:40
guess what, i get a driver not loaded message, i managed to compile with plugin but running it i get that, i checked the plugin's dependencies with dependency walker and i got everything ok, so any suggestions? thanks

btw do i need to add a path to some mysql directory in env vars?

chaosgeorge
24th November 2006, 02:51
ok it looks like qsqlmysql plugin does not need any libraries that come with the source of mysql, however to work with the Qt 4.2.1 i had to remake the plugin as I did with my home's 4.2.0, i dont think there is incompatibility with Qt versions because the plugin made in the 4.2.1 machine worked fine with my 4.2.0 at home, but i dont want to remake the plugin wherever i port my app, what could be the problem that i had to remake the plugin to work? mingw incompatibility? Qt? mysql drivers? :confused:

jacek
24th November 2006, 10:59
One of the possible explanations it that Qt adds a "build key" to plugins and it refuses to load them if their key differs from the library key.

http://doc.trolltech.com/4.2/plugins-howto.html#the-build-key