ubuntu下Qt连接oracle的驱动如何写
ubuntu下Qt Creator的数据库驱动只有Sqlite 和MySQL的驱动,没有Oracle的驱动。请问该如何编译该驱动?
[最优解释]
http://download.csdn.net/download/zoushulin0815/4522136
这里有个编译好的
http://dbua.iteye.com/blog/1155157
这里有个编译的博客
以上内容全部来自google
[其他解释]
你可以参考这篇博客,然后依葫芦画瓢.
http://www.jyguagua.com/?p=631
这个是Qt自带的帮助文档里面的内容:
How to Build the OCI Plugin on Windows
Choosing 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
[其他解释]
其实任何版本都可以编译的,只是你某些细节没做到.我建议你直接下载编译好的,然后放到对应的目录,记住一定要在pro文件里面加上一行:
QT += sql