Compile the Oracle driver in Windows to open the project: C: Qt4.8.1srcpluginssqldriversoci modify oci. pro: TARGETqsqlociSOURCESmain. c
Compile the Oracle driver in Windows to open the project: C: \ Qt \ 4.8.1 \ src \ plugins \ sqldrivers \ oci modify oci. pro: TARGET = qsqloci SOURCES = main. c
Compile the Oracle driver in Windows
Open the project:
C: \ Qt \ 4.8.1 \ src \ plugins \ sqldrivers \ oci
Modify oci. pro:
TARGET = qsqloci
SOURCES = main. cpp
Include (.../../SQL/drivers/oci/qsql_oci.pri)
Include (../qsqldriverbase. pri)
INCLUDEPATH + = D: \ oracle2 \ product \ 11.2.0 \ dbhome_1 \ OCI \ include
LIBPATH + = D: \ oracle2 \ product \ 11.2.0 \ dbhome_1 \ OCI \ lib \ MSVC
After compilation, copy the library file:
C: \ Qt \ 4.8.1 \ plugins \ sqldrivers
Qsqloci4.lib
Qsqlocid4.lib
Qsqloci4.dll
Qsqlocid4.dll
Compile the Oracle driver in Linux
Open the project:
/Usr/local/qt-4.5.2/src/plugins/sqldrivers/oci
View and modify the project file oci. pro:
[D5000 @ CentOS6-64 oci] $ cat oci. pro
TARGET = qsqloci
HEADERS =.../../SQL/drivers/oci/qsql_oci.h
SOURCES = main. cpp \
.../SQL/drivers/oci/qsql_oci.cpp
LIBPATH + =/u01/app/oracle/lib
Win32: LIBS * =-loci
Unix :! Contains (LIBS,. * clcnt. *): LIBS * =-lclntsh
Macx: QMAKE_LFLAGS + =-Wl,-flat_namespace,-U, _ environ
Include (../qsqldriverbase. pri)
After compilation, copy it to the corresponding directory.