无法打开包含文件:'occi.h':没有这样的文件或目录 [英] Cannot open include file: 'occi.h': No such file or directory

查看:2156
本文介绍了无法打开包含文件:'occi.h':没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译现有的C ++项目,但得到此错误:

 致命错误C1083:无法打开包含文件: 'occi.h':没有这样的文件或目录

我做的是我去这个链接:

  http://www.oracle.com/technetwork/topics/winsoft-085727.html 



并下载第一个(基本)包。



和修改的PATH变量,如下所示:

  C:\Program Files \Atmel\sam-ba_2.12\drv \; C:\Program Files\Atmel\sam-ba_2.12; C:\Program Files\ATMEL公司\AT91-ISP v1.4 \Library; C:\MSYS\1.0 \bin; C:\MSYS\1.0\local\bin; C:\cygnus\cygwin-b20 \H-i586-cygwin32 \bin; D:\instantclient_12_1 

最后是oracle的路径。
但我仍然得到错误,有人可以帮助吗?



我注意到在我的项目有如下行:

  #includeocci.h

也许是因为这个?

解决方案

基本包是不够的。其描述为要求运行 OCI,OCCI和JDBC-OCI应用程序所需的所有文件(强调添加);只是你可以运行OCI程序,但是你不能编译一个。您需要下载其他即时客户端组件。特别是对于 occi.h 标题,您需要列出第五个文件:


即时客户端软件包 - SDK:使用Instant Client开发Oracle应用程序的附加头文件和示例makefile


如果您下载并解压缩在解压缩基本包的同一个地方,您的即时客户端目录将获得一个 sdk 文件夹,其中包括所有OCI头文件。



那么你需要使用 -ID:\instantclient_12_1\sdk\\\\\\\\\\\\\\\\\\\\\\\插件编译,所以你的编译器知道在哪里寻找 occi.h 和其他头文件。您还可能需要 -L 告诉它在哪里找到Oracle库;大概你已经有了 -lclntsh 和/或 -locci ,它们指的是你应该已经从基本包。


I am trying to compile an existing C++ project but get this error:

 fatal error C1083: Cannot open include file: 'occi.h': No such file or directory

What I did is I went to this link:

http://www.oracle.com/technetwork/topics/winsoft-085727.html

and downloaded the first (basic) package.

Then unzipped the folder and modified PATH variable like this:

C:\Program Files\Atmel\sam-ba_2.12\drv\;C:\Program Files\Atmel\sam-ba_2.12;C:\Program Files\ATMEL Corporation\AT91-ISP v1.4\Library;C:\MSYS\1.0\bin;C:\MSYS\1.0\local\bin;C:\cygnus\cygwin-b20\H-i586-cygwin32\bin;D:\instantclient_12_1

last being path to oracle. But I still get the error, can someone help?

PS I noticed in my project there are lines like:

#include "occi.h"

Maybe it is because of this?

解决方案

The basic package isn't enough. Its description says "All files required to run OCI, OCCI, and JDBC-OCI application" (emphasis added); with just that you can run an OCI program, but you can't compile one. You need to download other instant client components. Specifically for the occi.h header you need the fifth file listed:

*Instant Client Package - SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client

If you download and unzip that in the same place you unzipped the basic package, your instant client directory will gain an sdk folder, which includes all the OCI header files.

You'll then need to compile with -I D:\instantclient_12_1\sdk\include so your compiler knows where to look for the occi.h and other header files. You may also need -L to tell it where to find the Oracle libraries; presumably you already have -lclntsh and/or -locci, which refer to libraries you should have already from the basic package.

这篇关于无法打开包含文件:'occi.h':没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆