linux连接oracle问题
我的代码:
#include "occi.h"
#include <iostream>
using namespace oracle:
cci;
using namespace std;
int main()
{
Environment *env;
Connection *con;
env = Enviroment::createEnvironment(Environment:EFAULT);
cout << "**" << endl;
return 0;
}
g++ -Wno-deprecated -fPIC -march=i486 -L/opt/oracle/product/9.2.0/lib -L/opt/oracle/product/9.2.0/rdbms/lib -I/opt/oracle/product/9.2.0
/rdbms/public -I/opt/oracle/product/9.2.0/rdbms/demo test.cpp -c
编译可以过
g++ -Wno-deprecated -fPIC -march=i486 -L/opt/oracle/product/9.2.0/lib -L/opt/oracle/product/9.2.0/rdbms/lib -locci9 -I/opt/orac
le/product/9.2.0/rdbms/public -I/opt/oracle/product/9.2.0/rdbms/demo -o test test.cpp
编译加连接,报错如下:
/tmp/ccpgfYCI.o(.text+0x2b): In function `main':
: undefined reference to `oracle:
cci::Environment::createEnvironment(oracle:
cci::Environment::Mode, void*, void* (*)(void*, unsigned int), void* (*)(void*, void*, unsigned int), void (*)(void*, void*))'
collect2: ld returned 1 exit status
请高手指点,谢谢!!!!