关于LINUX下编译OTL出现的OCI.H找不到的问题

reiller 2009-09-29 02:44:19
程序很简单就是一个连接库的小程序,编译的时候找不到OCI.H,求大虾们看看
程序
#include <iostream>
#include <stdio.h>
using namespace std;

#define OTL_ORA9I // Compile OTL 4.0/OCI9i
#include "otlv4.h" // include the OTL 4.0 header file

otl_connect db; // connect object

int main()
{
otl_connect::otl_initialize(); // initialize OCI environment
try
{
cout<<"Connect to database..."<<endl;
db.rlogon("asion/asion@cost219"); // connect to Oracle
cout<<"连接成功"<<endl;
}

catch(otl_exception& p)
{
// intercept OTL exceptions
cerr<<p.msg<<endl; // print out error message
cerr<<p.stm_text<<endl; // print out SQL that caused the error
cerr<<p.sqlstate<<endl; // print out SQLSTATE message
cerr<<p.var_info<<endl; // print out the variable that caused the error
}

db.logoff(); // disconnect from Oracle

return 0;
}
...全文
701 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
昵称很不好取 2009-10-04
  • 打赏
  • 举报
回复
oci.h 是Oracle提供的头文件,可以在oracle安装路径的包里面找到,可能还需要oci.lib,这个也需要包含进来
V68V6 2009-10-04
  • 打赏
  • 举报
回复
up

17,086

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧