当前位置: 代码迷 >> Solaris >> solaris 10 上用OCCI操作oracle 10g链接出错!
  详细解决方案

solaris 10 上用OCCI操作oracle 10g链接出错!

热度:7724   发布时间:2013-02-26 00:00:00.0
solaris 10 下用OCCI操作oracle 10g链接出错!!!
程序:
#include <iostream>
#include <string>
#include <occi.h>
#include <occiCommon.h>
#include <occiData.h>
#include <occiObjects.h>
#include <occiAQ.h>
#include <occiControl.h>
using namespace oracle::occi;
using namespace std;
int main()
{
   Environment *env;
   Connection *conn;
   string userName = "system";
   string password = "omcdb"; 
   string database = "192.168.20.223/omcdb";
   
   env=Environment::createEnvironment(Environment::OBJECT);
   conn=env->createConnection(userName,password,database);
   cout << "OCCI Environment  and Connection Created " << endl;
   
   return 0;
}
=====================
编译:
g++ -o oracleDemo oracleDemo.cpp -I $ORACLE_HOME/rdbms/public  -L $ORACLE_HOME/lib   -lclntsh -locci
=====================================
编译可以通过,链接出现错误:
未定义符号                              在文件中
__1cG__CrunKpure_error6F_v_         /export/home/oracle/product/10gr2/lib/libocci.so
__1cDstdbC__RTTI__1nDstdMlength_error__ /export/home/oracle/product/10gr2/lib/libocci.so
__1cDstdMout_of_range2T6M_v_        /export/home/oracle/product/10gr2/lib/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mpkc_r1_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cDstdLlogic_error2t6Mrkn0AMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc_____v_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cG__CrunIex_alloc6FI_pv_         /export/home/oracle/product/10gr2/lib/libocci.so
__1cG__CrunIex_throw6Fpvpkn0AQstatic_type_info_pF1_v_v_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mrk1_r1_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2t6MpkcIrkn0C__v_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cH__rwstdV__null_string_ref_rep4CcnDstdLchar_traits4Cc__n0BJallocator4Cc__n0AQ__string_ref_rep4n0D____2t6M_v_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cH__rwstdRexcept_msg_string2t6MIE_v_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2t6Mpkcrkn0C__v_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2T6M_v_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cH__rwstdbC__rwse_StringIndexOutOfRange_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cDstdZ__RTTI__1nDstdJbad_alloc__ /export/home/oracle/product/10gr2/lib/libocci.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___Gassign6Mrk1II_r1_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cG__CrunRex_chk_unexpected6F_v_  /export/home/oracle/product/10gr2/lib/libocci.so
__1cH__rwstdX__rwse_InvalidSizeParam_ /export/home/oracle/product/10gr2/lib/libocci.so
__1cDstdJbad_alloc2t6M_v_           /export/home/oracle/product/10gr2/lib/libocci.so
__1cH__rwstdbB__rwse_PosBeyondEndOfString_ /export/home/oracle/product/10gr2/lib/libocci.so
  相关解决方案