QT+MSVC2010编译32位ORACLE OCI驱动

环境

  • 操作系统:Win7 with SP1 x64

步骤

一、安装Oracle客户端,选择“运行时”。

下载页面:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.html

复制迅雷下载

二、安装QT

增加勾选:Source Componets->Essentials,其它默认。

三、进入cmd运行(根据实际情况):

set INCLUDE=C:\app\Alden\product\11.2.0\client_1\oci\include;%INCLUDE%
set LIB=C:\app\Alden\product\11.2.0\client_1\oci\lib\MSVC;%LIB%

set path=C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;%path%
set INCLUDE=C:\Program Files\Microsoft SDKs\Windows\v7.1\Include;%INCLUDE%
set LIB=C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib;%LIB%

set path=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;%path%
set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;%INCLUDE%
set LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib;%LIB%

set path=C:\Qt\Qt5.5.1\5.5\msvc2010\bin;%path%
set INCLUDE=C:\Qt\Qt5.5.1\5.5\msvc2010\include;%INCLUDE%
set LIB=C:\Qt\Qt5.5.1\5.5\msvc2010\lib;%LIB%

set path=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;%path%

然后:

cd C:\Qt\Qt5.5.1\5.5\Src\qtbase\src\plugins\sqldrivers\oci

qmake oci.pro

nmake

四、拷贝dll和lib文件

拷贝生成的所有dll和lib文件(C:\Qt\Qt5.5.1\5.5\Src\qtbase\plugins\sqldrivers)到C:\Qt\Qt5.5.1\5.5\msvc2010\plugins\sqldrivers。

附编译好的文件:http://download.csdn.net/download/xinzhengs/9947202

你可能感兴趣的:(QT+MSVC2010编译32位ORACLE OCI驱动)