windows qt 编译 oracle11g驱动

用qtcreator打开下属位置的工程E:\Qt\4.8.0\src\plugins\sqldrivers\oci

编译时候的pro文件要进行修改

TARGET = qsqloci
 
  
SOURCES = main.cpp
include(../../../sql/drivers/oci/qsql_oci.pri)
 
  
include(../qsqldriverbase.pri)
 
  
 
  
INCLUDEPATH += F:/app/Administrator/product/11.2.0/dbhome_1/OCI/include
LIBS += -L F:/app/Administrator/product/11.2.0/dbhome_1/BIN

其中include的以及LIBS为oracel的安装目录

要记得加上-L


生成的动态库在下面的目录

E:\Qt\4.8.0\plugins\sqldrivers

你可能感兴趣的:(QT)