Qt World Summit: Register Today!

Qt Oracle databbase plugin registration

  • Hello everyone :),

    I built the plug-in for oracle database and have been working very happily with my qt app and Oracle 10g XE.

    When the plug-in was built, the files qsqlocid4.dll and qsqlocid4.lib were created; and I simply copied these files to this location:

    C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\plugins\sqldrivers; all works perfect.

    However I have a Qt and Oracle installation on other computer; I thought that it was only necessary to copy the *.lib and *.dll files to the plug-ins folder of the Qt installation in this new machine to make it work (it also has VS2008 installed, so the compiler that generated the plug-in is the same for both machines).

    Unfortunately when I execute my program, in this second machine, it tells me it can´t load the Oracle plugin...

    I think it is because I only copied the driver and not created it in this second machine and because of this, I suppose that in the process of creating the plugin, Qt enables it for future use or something.

    Is there a way I can register my already created plugin, so I don´t have to build it over and over in every machine that needs it?

    Thanks in advance.

  • Hi.

    You must package the main Qt DLL you are using (unless you are using a statically linked version of Qt), see this link:

    Then if you use Qt plugins (in your case you use at less one: the Oracle plugin), you will have to deploy a qt.conf file with reference to the directory in which you deploy the plugins libraries, see this link:
    For instance you can use "." as "Prefix" and have a "plugins" directory next to the exe.

  • Thanks for your answer Greg.

    As I understand the links and references that you provide are for deploying Qt applications.

    My situation is that in the second machine I mention, I don´t want to deploy. What I want to do is re-compile my program in this machine, that's why I only copied the plug-in to:


    I hoped QtCreator was able to find them in that location but it didn't ...

    You think that the *.conf file can help me with this issue too?


  • Sorry I did not understand your problem, I don't think qt.conf may help.

Log in to reply