[Solved] Problems building Oracle Call Interface (OCI) Plugin on Windows
-
Okay, I found out where the problem was some time ago but I didn't have any time to write it here.
So, I was able to build a working plugin as mentioned above. The last problem was that I was calling a member function of a class that handles the database before I called the constructor of the class.
Feeling a bit shamed here about that :PSo the problem and solution was rather trivial here, I just didn't notice it. The problem with noticing this problem is that the compiler or builder doesn't think that calling member functions of a not-constructed class is actually an error (C++, that is).
-
[quote author="ionwind" date="1307431973"]
So the problem and solution was rather trivial here, I just didn't notice it. The problem with noticing this problem is that the compiler or builder doesn't think that calling member functions of a not-constructed class is actually an error (C++, that is).[/quote]If you have pointers, the compiler can't know. You might have initialized that pointer somewhere in a plugin or a lib, which the compiler doesn't even see on compile time.
So, this happens from time to time - good to know that the solution is that easy and that it is not a bug in the libs :)
-
Hi,
I am slogging with the OCI plugin for Qt4.7.3.
After completing all the steps mentioned by ionwind when I execute nmake I get the following error:
@g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-ps
eudo-reloc -mthreads -Wl -shared -Wl,--out-implib,debug\libqsqlocid4.a -o debug
qsqlocid4.dll debug/main.o debug/qsql_oci.o debug/moc_qsql_oci.o -L"c:\QtSDK
Desktop\Qt\4.7.3\mingw\lib" debug\qsqlocid_resource_res.o -loci -lQtSqld4 -lQtCo
red4
c:/qtsdk/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -loci
collect2: ld returned 1 exit status
NMAKE : fatal error U1077: 'C:\QtSDK\mingw\bin\g++.EXE' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\bi
n\nmake.exe"' : return code '0x2'
Stop.@The compiler says -loci can't be found.
I am running Oracle Express 10g on a Windows 7 Ultimate machine.
What is that I am missing here?
-
Avoid giving specific file path in environment variable, so update the path variable with C:\XEClient\bin
If you still get the -loci missing error, try copying the dll to system directory (eg. C:\windows\system32) and your make should find it without any problem.
-
Use set PATH = %PATH%;c:\XEClient\bin & then run nmake or copy the DLL file to windows\system32
Another option is to edit the environment variable in system properties dialog to make it accessible from all locations.
[Control Panel -> System -> Advanced System Settings -> Advanced Tab -> Environment Variable]Sometimes a system restart is required for the changes to become effective.
-
-
@mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directoryC:/QtSDK/QtSources/4.7.4/src/plugins/sqldrivers/oci' g++ -mthreads -shared -Wl,--out-implib,debug\libqsqlocid4.a -o debug\qsqlocid4.dll debug/main.o debug/qsql_oci.o debug/moc_qsql_oci.o -L"c:\QtSDK\Desktop\Qt\4.7.4\mingw\lib" debug\qsqlocid_resource_res.o -loci -lQtSqld4 -lQtCored4 mingw32-make[1]: Leaving directory
C:/QtSDK/QtSources/4.7.4/src/plugins/sqldrivers/oci'
@
I didn't get all code from output hmm strange -
from the above i can't make out if there's an error, it appears that make has found the dependency and driver has been compiled.
What is there in your QTDIR\src\plugins\sqldrivers\oci\debug directory? if possible send the full debug to nilotpal2007[AT]gmail[DOT]com