Compile Oracle 64 bit plugin on Windows 64 bit with Qt4.3
-
Hello everyone,Compile Oracle 64 bit plugin on Windows 64 bit with Qt4.3
I've an application which must connect to an Oracle database. It works well on Windows x32 bit. But recently, I've encoutred a problem with Oracle 11g 64 bit installed on Windows 64 bit and I'm receveing the error message "Driver not loaded".
I've tried to compile a new qsqlOci plugin but I've some link errors like " error LNK2019: symbole externe non résolu _OCIDescriptorAlloc référencé dans la fonction "public: __thiscall QOCIRowId::QOCIRowId(struct OCIEnv *)" (??0QOCIRowId@@QAE@PAUOCIEnv@@@Z)"
Note that I'm using Qt 4.3 with VS 2005
Does anyone have an idea about this problem and can help me to resolve it ?
Many thank in advance.
Best regards. -
Hi,
The loading failure can be because the Oracle dlls cannot be found, adjust the PATH environment variable in QtCreator's run panel and add the path to these dlls.
The link failure might indicate a missing library to link to
On a side, are you locked to this pretty old version of Qt ? The latest in the 4 edition is 4.8.5
-
Hi,
Thanks for your reply.
Exacetly, there are some dlls who are not found but I've added the Oracle bin to Environement Paths, I've added to oci.dll with to the Qt source plungins.
I've tried a lot of manipulation but none have resolved the problem.
For the Qt 4.3, it is our licenced Qt and it Works well until now :)
-
When you build your plugin you also need to give the path to the corresponding OCI lib files that might not be in the same folder as the dlls.
-
Of course I did that, I do like this "set LIB=%LIB%;c:\oracle\oci\lib\msvc"
-
Can you show me the steps you are using to build the plugin ?
-
I'm using the steps as follows in the Qt doc :
set INCLUDE=%INCLUDE%;C:\Oracle11g\product\dbhome\OCI\include
set LIB=%LIB%;C:\Oracle11g\product\dbhome\OCI\lib\MSVC
cd %QTDIR%\src\plugins\sqldrivers\oci
qmake -o Makefile oci.pro
nmake
-
Strange… Looks correct. Does it also contain a VS2005 version of the library ?
-
.....i Haven't understund what do you mean...please can you explain more
-
Some enterprises have the good idea to provide their libs/dlls for various versions of Visual Studio. Is it the case here ? Or to you only have one lib file ?
-
.....No I've only one lib file
-
Then check whether it contains or not that missing symbol