Home » Developer & Programmer » Precompilers, OCI & OCCI » occi compile error (SunOS Solaris 10,oracle 10g R2 10.2.0.5,)
occi compile error [message #507555] Mon, 16 May 2011 21:29
shjee89
Messages: 1
Registered: May 2011
Junior Member
my occi first source is below.

#include <iostream>
#include <occi.h>
using namespace std;
using namespace oracle::occi;

int main(int argc, char* argv[])
{
Environment *env = Environment::createEnvironment();
Connection *conn = env->createConnection("wiesm","jwofjwi");

Statement *stmt = conn->createStatement("select count(*) from log_ids where agg_start_dt = '20110513'");
ResultSet *rs = stmt->executeQuery();
rs->next();
int nCount = rs->getInt(1);
cout << "log_ids count(20110513):" << nCount << endl;
stmt->closeResultSet(rs);
conn->terminateStatement(stmt);
env->terminateConnection(conn);
Environment::terminateEnvironment(env);
return 0;
}

$>g++ -I/oracle/product/10.2.0/db_1/rdbms/public -o ok ok.cc -L/oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2 -lclntsh -locci
not defined symbol(below is error link message)
__1cG__CrunKpure_error6F_v_ /oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2/libocci.so
__1cDstdbC__RTTI__1nDstdMlength_error__ /oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2/libocci.so
__1cDstdMout_of_range2T6M_v_ /oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mpkc_r1_ /oracle/product/10.2.0/db_1/instantclient32/instantclient
_10_2/libocci.so
__1cG__CrunIex_alloc6FI_pv_ /oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2/libocci.so
__1cG__CrunIex_throw6Fpvpkn0AQstatic_type_info_pF1_v_v_ /oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mrk1_r1_ /oracle/product/10.2.0/db_1/instantclient32/instantclient
_10_2/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2t6MpkcIrkn0C__v_ /oracle/product/10.2.0/db_1/instantclient32/instant
client_10_2/libocci.so
__1cH__rwstdRexcept_msg_string2t6MIE_v_ /oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2t6Mpkcrkn0C__v_ /oracle/product/10.2.0/db_1/instantclient32/instantc
lient_10_2/libocci.so
__1cH__rwstdbC__rwse_StringIndexOutOfRange_ /oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2/libocci.so
__1cDstdZ__RTTI__1nDstdJbad_alloc__ /oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___Gassign6Mrk1II_r1_ /oracle/product/10.2.0/db_1/instantclient32/instan
tclient_10_2/libocci.so
...

ESHserver@/oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2 >ls -l
total 202452
lrwxrwxrwx 1 master00 oinstall 17 5월 16일 09:33 libclntsh.so -> libclntsh.so.10.1
-rw-r--r-- 1 master00 oinstall 22747924 5월 16일 09:32 libclntsh.so.10.1
-rw-r--r-- 1 master00 oinstall 6833692 5월 16일 09:32 libnnz10.so
lrwxrwxrwx 1 master00 oinstall 15 5월 16일 09:34 libocci.so -> libocci.so.10.1
-rw-r--r-- 1 master00 oinstall 1292828 5월 16일 09:32 libocci.so.10.1
-rw-r--r-- 1 master00 oinstall 72678472 5월 16일 09:32 libociei.so

please, help me.

make=> $>g++ -I/oracle/product/10.2.0/db_1/rdbms/public -o ok ok.cc -L/oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2 -lclntsh -locci

oracle 10g R2 10.2.0.5
solaris 10 && lib32
g++ 3.4.6

export LD_LIBRARY_PATH=/oracle/product/10.2.0/db_1/instantclient32/instantclient_10_2
Previous Topic: OCIRaw Array Bind
Next Topic: Occi Connection Error
Goto Forum:
  


Current Time: Sun Dec 21 20:31:06 CST 2014

Total time taken to generate the page: 0.08561 seconds