hi to all, I've centos 6.6 in VM having codeblocks. and oracle 11gr2 in server(second VM).
i made a programm based on OCCI following code:-
#include <iostream>
#include <iomanip>
#include <oracle/11.2/client/occi.h>
using namespace std;
using namespace oracle::occi;
int main()
{
//Create new environment
Environment *env = Environment::createEnvironment(Environment::DEFAULT);
Connection *conn = NULL;
try {
string user = "scott";
string passwd = "tiger";
cout << "conection initialised"<< endl;
//Create new connection
conn = env->createConnection(user, passwd,"ora11gr2");// host);//"ora11gr2");//, host);
cout << "conected"<< endl;
}
catch(SQLException &e) {
cout << e.getMessage();
}
try {
Statement *stmt = conn->createStatement("SELECT * FROM emp");
stmt->setPrefetchRowCount(32);
ResultSet *rs = stmt->executeQuery();
while(rs->next()) {
cout << setw(5) << rs->getInt(1) << " " << setw(8) << rs->getString(2) << " "// << endl;
<< setw(6) << rs->getString(3) << " "<< setw(4) << rs->getInt(4) << " " //<< endl;
<< setw(10) << rs->getString(5) << " " << setw(5) << rs->getFloat(6) << " "// << endl;
<< setw(8) << rs->getFloat(7) << " "<< setw(4) << rs->getInt(8) << endl;
}
}
catch(SQLException &e) {
cout << e.what();
}
return 0;
}
now problem is that when i compiled this project in DEBUG mode, it is executed well ( without error. ( also i added clntsh, nnz11, occi libraries). now when i build this project RELEASE mode follwoing error occured :-
Build: Release in oraconn (compiler: GNU GCC Compiler)
ld cannot find -lclntsh
Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
how to find it please suggest me.