`

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,搞定!

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics