windows下编译Oracle驱动插件QOCI

Qt帮助文档中提到的编译方法如下:

How to Build the OCI Plugin on WindowsChoosing the option “Programmer” in the Oracle Client Installer from the Oracle Client Installation CD is sufficient to build the plugin.
Build the plugin as follows (here it is assumed that Oracle Client is installed in C:\oracle):
set INCLUDE=%INCLUDE%;c:\oracle\oci\include set LIB=%LIB%;c:\oracle\oci\lib\msvc cd %QTDIR%\src\plugins\sqldrivers\oci qmake oci.pro nmake
If you are not using a Microsoft compiler, replace nmake with make in the line above.
When you run your application you will also need to add the oci.dll path to your PATH environment variable:
set PATH=%PATH%;c:\oracle\bin
Note: This database plugin is not supported for Windows CE.

本人按以上方法编译不成功,nmake一大堆错,mingw32-make也不行。

经仔细检查,发现是找不到oracle相关文件导致的,因此,修改qmake指令参数如下:

qmake "INCLUDEPATH+=c:\oracle\oci\include" "LIBS+=-Lc:\oracle\oci\lib\msvc" oci.pro

然后调用mingw32-make,搞定!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值