OCCI Compilation Error [message #341683] |
Tue, 19 August 2008 23:41 |
vijayvijay
Messages: 1 Registered: August 2008
|
Junior Member |
|
|
Pls any one help in fixing the below OCCI error .
I declared below in SampleDB.h
oracle::occi::Environment *dbEnv;
oracle::occi::Connection *dbConn;
I am doing below in SampleDB.cpp file
dbEnv = oracle::occi::Environment::createEnvironment();
dbConn=dbEnv->createConnection(DB_UID,DB_PWD,DB_NAME);
When I include SampleDB.h in different source file MyApp.cpp and compile it , I am getting below error.
"/app/oracle/client/runtime/10.2.0.3/rdbms/public/occiControl.h", line 752: Error: Identifier expected instead of "0x10".
Pls let me know if any one faced this issue and how it is resolved.
|
|
|
Re: OCCI Compilation Error [message #349031 is a reply to message #341683] |
Thu, 18 September 2008 11:11 |
yongluouk
Messages: 9 Registered: September 2008
|
Junior Member |
|
|
Hello,
I am sorry that I cannot help on your problem, but you may know how to help me. Thank you.
My OS is Linux and I installed Oracle 10.2. Everything is fine.
I can use sqlplus, exp, imp etc with no problem.
Now I have created another linux user test in /home/test.
I unzipped basic-10.2xxxxxx.zip (/home/test/instantclient_10_2) and exported LD_LIBRARY_PATH.
I guess I have installed instant client in this way.
My testOra.cpp:
#include <occi.h>
using namespace oracle::occi;
int main()
{
Environment* env = Environment::createEnvironment();
...
return 0;
}
This testOra.cpp would not compile.
Error: undefined reference ...createEnvironment(...)
It compiles if I change the first line as follows (not create).
Environment* env;
Would you please tell me what to do?
|
|
|