关于LINUX下编译OTL出现的OCI.H找不到的问题
程序很简单就是一个连接库的小程序,编译的时候找不到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;
}