Error while building the OCI Plugin in widows 7
-
I am trying to bulild the OCI Plugin. I have written the below code and save it as batch file and ran it.
set INCLUDE=%include%;C:\oracle\product\10.2.0\db_1\OCI\include;C:\Qt\Qt5.0.2\Tools\MinGW\include
set LIB=%lib%;C:\oracle\product\10.2.0\db_1\OCI\lib\MSVC
cd C:\Qt\Qt5.0.2\5.0.2\Src\qtbase\src\plugins\sqldrivers\oci
qmake oci.pro
mingw32-makeHowever While running the above code in batch mode I’m facing below error
.obj/release/qsql_oci.o:qsql_oci.cpp:(.text+0xb464): undefined reference to
OCI NumberToInt' .obj/release/qsql_oci.o:qsql_oci.cpp:(.text+0xb520): undefined reference to
OCI
NumberToInt'
.obj/release/qsql_oci.o:qsql_oci.cpp:(.text+0xb638): undefined reference toOCI HandleFree' .obj/release/qsql_oci.o:qsql_oci.cpp:(.text+0xb691): undefined reference to
OCI
HandleAlloc'
.obj/release/qsql_oci.o:qsql_oci.cpp:(.text+0xb6e2): undefined reference toOCI StmtPrepare' C:/Qt5.3.0/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i 686-w64-mingw32/bin/ld.exe: .obj/release/qsql_oci.o: bad reloc address 0x1 in se ction
.text$_ZN17QtMetaTypePrivate23QMetaTypeFunctionHelperIP7OCIStmtLb1EE6Dele
teEPv[__ZN17QtMetaTypePrivate23QMetaTypeFunctionHelperIP7OCIStmtLb1EE6DeleteEPv]
'
collect2.exe: error: ld returned 1 exit status
Makefile.Release:80: recipe for target '........\plugins\sqldrivers\qsqloci.d
ll' failed
mingw32-make[1]: *** [........\plugins\sqldrivers\qsqloci.dll] Error 1
mingw32-make[1]: Leaving directory 'C:/qt-everywhere-opensource-src-5.2.1/qtbase
/src/plugins/sqldrivers/oci'how to slove it ? 3Q
-
Hi,
Is it me or are you trying to link a Visual Studio built library with a MinGW built Qt ?
-
This person has the same problem as I do. Is getting the same errors.
My question is posted here: https://forum.qt.io/topic/80928/problem-building-oci-plugin-for-qt-5-9-1/10