简体   繁体   中英

Qt Oracle plug-in registration

I built the plug-in for oracle database and have been working very happily with my Qt program 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, and I need to re-compile this same program in this "new" machine. I thought that it was only necessary to copy the *.lib and *.dll files (the already built driver) to the plug-ins folder of the Qt installation in this second machine to make it work (this computer 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 driver, Qt enables or registers it for future use or something.

Is there a way I can register or enable the driver, so I don't have to build it over and over in every machine that needs it?

There is a good chance that when you have compiled your Qt dlls on the first machine and you copied them to the specified directory, the Qt system still used them from the original directory ... somehow I kind of recall that Qt embeds the installation path into the executables... might be I'm wrong. You should put the plugins in the "sqldrivers" directory which is in the directory where your application runs (ie: the "exe" trying to load the plugin and the "sqldrivers" sub directory are in the same directory).

Or yes, you can re-compile them on the new machine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM