About OCCI in CC/gcc

compile an OCCI program using CC under Solaris is OK.
CC -o main main.cpp src1.cpp src2.cpp -lpthread -lrt -lnsl -locci -lclntsh -I/export/home/oracle/rdbms/demo -I/export/home/oracle/rdbms/public -L/export/home/oracle/lib -L/usr/local/lib
But using gcc under Solaris :
未定义 文件中的
符号 在文件中
std::ios_base::Init::~Init [in-charge]()/var/tmp//ccTBAkoI.o
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___Hcompare6kMIIpkcI_i_ /export/home/oracle/lib/libocci.so
c::c(N6, (int0_t)) /export/home/oracle/lib/libocci.so
oracle::occi::SQLException::getErrorCode() const/var/tmp//ccW2yUcB.o
ld: 致命的: 符号参照错误. 没有输出被写入main

You need to apply Patch 9339748.

Similar Messages

  • When OCCI will support GCC 3.2.*

    I think a lots Oracle funs want know when Oracle will release OCCI to support GCC 3.2 or newer version GCC. I plan to estimate OCCI on GCC 3.2.* for Solaris and Linux to help us make decision when will deploy OCCI solution to our customers to resolve Java application performance issue.

    Toliver
    Thank you, gcc 3.2.* support is really important to us.

  • Parse error in OCCI header, sol8 & gcc 2.95.2

    All I did was include occi.h, and set the namespaces:
    #include <occi.h>
    using namespace oracle::occi;
    using namespace std;
    ... no other OCCI code
    error is:
    In file included from .../occi.h:48
    ..../occiObjects.h: in method 'oracle::occi::Ref<T>::operator
    oracle::occi::RefAny() const':
    occiObjects.h:509: parse error before ';'
    etc.
    Any help would be appreciated. Should I upgrade to gcc 3?
    jds

    Hi,
    You need Sun's compiler workshop for using OCCI. The name
    mangling for gcc and CC is not the same.
    rahul

  • OCCI patch supporting gcc 3.2.3

    Hi, experts,
    We have an application built with gcc 3.2.3 on RedHat AS3.0 with Oracle 10.1.0.2.0 installed. After we applied OCCI patch that is claimed as gcc 3.2.3 support, our application works well using Oracle 10g.
    My question is whether Oracle provides similar OCCI patch to Oracle 9iR2 installed on RedHat AS3.0. To my knowledge, all Oracle 9iR2 (9.2.0.4, or 9.2.0.6 Dec. 04) have OCCI package compatible only with gcc 2.96.
    In another word, if we want our code to benefit from gcc 3.2.3 on AS 3.0, we have to use Oracle 10g ?!
    Thanks,
    -Shan

    yes, you need to use 10g client.

  • When OCCI will support GNU GCC v3.3.2?

    When OCCI will support GNU GCC v3.3.2?
    Would like to know when Oracle will release OCCI
    to support GCC 3.2 or newer version GCC.
    I plan to estimate OCCI on GCC 3.2.* for Solaris and Linux to help us make
    decision when will deploy OCCI solution to our customers to resolve
    Java application performance issue.
    Do any Oracle staff advice it?
    Thanks!
    Senthil

    If it is RedHat Linux AS3.0/4.0, OCCI 10.2 is supported with gcc3.2.3 only. It may be supported with gcc3.4.3 in future.

  • Installing OCCI for visual studio2010?

    I dont understand how i'm supposed to install OCCI for visual studio 2010 when the download includes the following items
    1.) a .lib file
    2.) .dll
    3.) .sym
    i understand how to use .lib files but in order to use it u need the .h file that includes the function prototypes located in the .lib...can anyone explain what im doing wrong or how i can acccess the functions and structures located inside the .lib file included with the OCCI download?

    I can only speak for VS2008, but maybe it helps.
    In the project properties windows / configuration properties / linker / aditional dependencies you shoud have: oraocci11.lib (for release), oraocci11.lib (for debug).
    Also you should set your Visual Studio paths (inclusion, reference, libraries)
    Mark Williams blog about OCCI and VS was helpful for me in the past: http://oradim.blogspot.com/2009/07/getting-started-with-occi-windows.html
    And obviously you should: #include <occi.h>

  • OCCI problem - Please urgent guidance needed

    I'm using VC++ 6.0 and Oracle 10g, and want to connect to the Oracle database XE, code is getting compile successfully, but i'm getting runtime exception on executing the application... [its normal command line application]
    conn = env->createConnection ("admin", "admin","//localhost:1521/XE"); - rutime exception on this statement
    Here is the code snippet:
    #pragma comment(lib, "oraocci10.lib")
    #define WIN32COMMON
    #include <stdlib.h>
    #include <occi.h>
    #include <iostream>
    using namespace oracle::occi;
    using namespace std;
    class lobarray
    private:
    Environment *env;
    Connection *conn;
    public:
    lobarray (string user, string passwd, string db)
         cout <<"connecting DB" << endl;
    env = Environment::createEnvironment();
         cout <<"ENV set" << endl;
    conn = env->createConnection ("admin", "admin","//<ip_address>:1521/XE");     //Runtime exception...
         cout <<"conneted " << endl;
    As, First time ever i'm working on VC++, so i have no clue how to address this.. although i read about OCCI, header file, libs.. and able to complie program..
    I do catching SQLException in code.. where i'm creating the object......
    Please provide any hit/Guidance/ or links to refer...
    This program will be running from client machine and will connect to Oracle server (diff machine) over the network.
    Please let me know, how do i achieve this?

    Hi,
    you cannot use the occi 10g with VC6++ !
    When using precompiled C++ library, you have to use the same compiler than the one used to compile the C++ dll.
    Oracle 10g provided occi dll to be used with VC7 and VC7.1
    It's not possible to use them the VC6 C++ runtime.
    That' why OCCI is alway a pain... Because Oracle only provides precompiled shared libs, you have to use supported compilers. and VC6 C++ runtime is not.
    You have to upgrade your VC version or use the Windows SDK that includes free C++ compiler and C++ runtime.

  • OCCI Compiling problem

    I am trying to complie a simple OCCI program with the latest Oracle 10g client(with full installation) and gcc 3.2.2-5 (Oracle says OCCI works with gcc 3.2) on a Red Hat 9 box, I got the following error message:
    undefined reference to `oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void*, void* (*(void*,unsigned), void* (*)(void*, void*, unsigned),void(*)(void*, void*))'
    undefined reference to`oracle::occi::Environment::terminateEnvironment(oracle::occi::Environment*)'
    Does anyone know how to solve it? This program works fine with VC++ 6.0 and it is OK to complie OCI program on the same Linux box.
    Thanks in advance!

    Never mind. I got it worked.
    The final commmand I used like this (myprogram is the executable file on linux):
    g++ -o myprogram -L $ORACLE_HOME/lib -L $ORACLE_HOME/rdbms/lib -locci -lclntsh myprogram.cpp
    I got the previous problem by missing "-locci". Right now I get a warning, /u01/app/oracle/product/10.1.0/client_1/lib/libclntsh.so: warning: remap_file_pages is not implemented and will always fail, although it does not affect my programm. Anyone know what does it mean?

  • Petition to open-source OCCI

    We are a large Oracle site running 10g on Solaris. We have plenty of C++ code. We are using g++ 3.4.x and we wish to use OCCI. But we can't because it's not supported with g++ on Solaris. We refuse to backport our C++ code to Sun's ancient RogueWave C++ library (non-standard) and Oracle doesn't support STLPort (also provided by Sun).
    I know that there are many of you out there in a similar situation. You can't get OCCI to work with your combination of platform/compiler/std.library. For examples of exasperated users see:
    Re: occi doesn't support STLPORT
    Re: Lower level information
    OCCI with Red Hat Enterprise Linux 3
    C++ on Solaris with OCCI
    I understand that it is unreasonable expect Oracle to provide binary libraries for every combination of platform/compiler/library. The solution seems clear: open-source OCCI.
    The objection might be raised that this would make it hard for Oracle to provide support. In reality, most potential users of OCCI would (in my opinion) be happy to just have the opportunity of using it. The reality is that most of us that can't use it are trying to make do with (somewhat poor) open-source alternatives anyway. And Oracle can always continue to provide the "official" binaries with the current level of support.
    I raised a TAR back in July '05 (4562431.993) which resulted in the creation of an Enhancement Request (4522152). This ER seems to have disappeared into a black-hole.
    If you want Oracle to be more responsive to your needs with respect to OCCI, then please reply to this message. Hopefully, someone at Oracle will realise that their customers have an unfulfilled need here and act upon it.
    Cheers,
    Mike.
    mlambrellis(AT)powercor.com.au

    Please add my name to the petition.
    I also tried a tar.
    The Oracle person added all my comments to the ER, but the occi people basically said
    "libocci is not supported in SuSE 10.1"
    Here is some of what I sent originally for everyone's edification:
    We are trying to build a large 64 bit C++/Qt/OCCI application on
    SuSE 10.1 Linux. Here's a 'uname -a':
    Linux grima 2.6.16.21-0.13-smp #1 SMP Mon Jul 17 17:22:44 UTC 2006 x86_64 x86_64 x86_64
    SuSE 10.1 comes with gcc 4.1 and uses libstdc++.so.6.x.x. All
    the kde/qt libs have been compiled against libstdc++.so.6.x.x.
    libstdc++.so.6.x.x is not compile-time compatible with
    libstdc++.so.5.x.x. As far as we know, there is NO 64-bit
    libocci library available that links against libstdc++.so.6.x.x
    from any of oracle's public downloads. Thus, our application
    will not link. This is unacceptable.
    SuSE provides a libstdc++.so.5.x.x for backwards compatibility.
    If we link our app explicitly to the older libocci, we get a
    compile-time warning and a run time crash.
    We need Oracle to
    1) Release the source code for OCCI under an LGPL license or
    similar so that we and others can compile libocci ourselves
    for whatever version of compiler/libstc++/platform.
    or, minimally.
    2) make sure all major distros' versions of
    gcc/libstdc++/platform are tracked and a version of libocci
    exists for public download for each.
    This is a repeat of the gcc 2.96 fiasco that existed several
    years ago when one could not compile an occi program against gcc
    3.x because there the only libocci versions available had been
    linked against the incompatible 2.96 version.
    Please release source code!

  • OCCI and Object Views

    Can you use OCCI with object views? Here is the problem that I am seeing:
    SCHEMA.SQL:
    CREATE TABLE EMP_TABLE
    empnumber NUMBER (5),
    job VARCHAR2 (20)
    CREATE TYPE EMPLOYEE_T as object
    empnumber NUMBER (5),
    job VARCHAR2 (20) )
    CREATE VIEW EMP_VIEW OF EMPLOYEE_T
    WITH OBJECT IDENTIFIER (empnumber) AS
    SELECT e.empnumber, e.job
    FROM EMP_TABLE e
    In the code, I try:
    env = Environment::createEnvironment(Environment::OBJECT);
    conn = env->createConnection(username, password, connection);
    RegisterMappings(env);
    Employee* e = new(conn,"EMP_VIEW")Employee(); //works
    Ref<Employee>e1=new(conn,"EMP_VIEW")Employee(); //fails
    Debugging the code, I get an access violation in the Ref constructor:
    template <class T>
    Ref<T>::Ref(const T *obj)
    rimplPtr = new RefImpl((PObject *)obj); // <==Access violation
    System specs:
    Windows 2000AS
    Oracle 9.2.0.4

    Sorry to be so long in replying, we decided to move back to objects without the views. Our DBAs were not happy, but sometimes that's how it goes. I did not want to have to go to using associative access for my object manipulation because it is not robust enough for real code, IMHO. So, I would rather do something that I can make work in the real world than have a database model that makes me write what I consider to be bad code. I do wish that OCCI would become more exception-safe as well as I wish that there were not cases where associative access worked but navigational access dod not.
    <rant>
    One observation about OCCI in general is that using associative access seems to be a bad idea in almost all real-world scenarios. Actually, most of the OCCI constructs seem to be less-than-optimally designed from a C++ perspective. Tossing raw pointers around is not the way toward robust software. And most of the constructs in OCCI do that and worse. None of the high level constructs like Environment, Connection, Statement, etc. are exception safe in any sense of the word. I have (like a lot of you, I'm sure) have had to write a layer on top of the base OCCI classes to enforce some level of exception safety. Not that its a big deal or anything, but just one more thing I would rather not have to do...
    </rant>

  • RAC OCCI connectString

    Dear all,
    Recently i have set up a 2-node RAC environment, and i will put the my application on the local host. The rac database global name: agdb.world, the 2 instances respectively are agdb1 and agdb2. i also use the DBCA to create a service name ag_db.
    tnsnames.ora:
    ag_db=
    (description =
    (address=(protocol=tcp)(host=myip1)(port=1521))
    (address=(protocol=tcp)(host=myip2)(port=1521))
    (load_balance=yes)
    (connect_data=
    (server = dedicated)
    (service_name = agdb.world)
    In my occi application, i use the connectString //localhost:1521/ag_db to connect to my RAC database, and i got the following error:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor.
    I also use the "tnsping ag_db", it is OK, even use the "sqlplus user/pass@ag_db", it is OK too. But when i input the "sqlplus user/pass@//localhost:1521/ag_db", i got the ORA-12514 too.
    Can anyone give me a hint?
    thanks

    Having looked into this matter myself there is a concern
    about fail over with OCI or OCCI. Isn't there suppose to be
    something in the tnsnames that specifies TAF failover. In
    other words if one node goes down there has to be something
    in the tnsnames that tells the OCCI app which node to route
    to. I just looked into this and there were some talk about OCCI
    & OCI and failover, which I would like some clarification on as
    well.

  • Migrating from OCI to OCCI

    Hi everyone,
    I'm currently tasked with finding a way to migrate our code slowly from OCI to OCCI. The idea is the following:
    We have an application that creates an OCI environment and context, etc. and we'd like to reuse that existing connection in a surround C++ program. So essentially, create an OCCI environment from an OCI environment.
    So, I've found a documented way to get an OCI environment from an OCCI environment, however I couldn't find anything about the other way around.
    Is there maybe some undocumented constructor or something along those lines, that would allow to go this route? If there is an expert, who could give me a clear 'NO' to this, it would also be very helpful.
    Thanks for any advice!
    Peter

    Since OCCI is built as a interface over the OCI you can get hold of an OCIEnv from OCCI
    The other way is not possible as OCI does not know anything about OCCI.

  • [OCCI] get stuck in setVectorOfPObjects

    i try to call a db procedure which requieres a vector PObjects* as an input (std::vector<oracle::occi::PObject* > allItems )
    so as usual i call the following to set the vector to be inserted.
    oracle::occi::setVectorOfPObjects(stmt, 1, allItems, std::string("XXX"), std::string("NT_ABC"));
    BUT i never come out of this method or neither got a exception.
    If i dont add any element to allItems i at least can execute the statement but from the point on i try to insert data i get stuck.
    (i use occi 11.1.0.6)
    Does anybody has an idea what could cause the problem?
    greetings

    Your question seems to be specifically about OCCI, as opposed to general C++ development, or Studio C++ in particular.
    I suggest you try the SQL development forum:
    SQL Developer Data Modeler
    Or one of the Oracle database forums:
    Database

  • ResultSet next()  - previous()?

    Hi,
    I have a query that returns a large number of records (lets say larger than memory). I need to iterate over the records in a nested loops fashion and update/delete certain records.
    For example, if the result set wasn't so big, I could solve the problem by reading it into an STL vector and ect, ect.
    I want effectively two ResultSet objects without having the database execute the query twice. I also want to be able to reset the Result set object (send it back to the beginning).
    Possibly I am attacking this problem from the wrong direction...
    Thank you,
    Josh

    I really need a method of doing this too.
    Is there a way?
    I know it can be done in OCI, but what about OCCI?

  • Memory leak in c++ application

    This one line of code is creating a memory leak in my application and I'm not sure what to do after this statement to prevent this from happening.
    Here's the line of code:
    oracle::occi::PObject * pObject = m_statement->getObject( 3 );

    This forum is for general programming questions, and for questions about Studio.
    Questions specifically about OCCI are more likely to get a helpful answer in the OCCI forum:
    C++ Call Interface (OCCI)
    (You can find this and other data-base related forums at forums.oracle.com, then expand the Oracle Database item, then click "more".)

Maybe you are looking for

  • How can I center text in a JTextArea?

    I'm coding my own little font selection frame, and want to display the sample text in a JTextArea, and want to know how I can get the text centered in the field. Does anyone know how this can be done? Thanks.

  • E61i - adobe reader le 1.5 doesn't work after firm...

    After successful firmware upgrade to 2.0633.65.01 03-10-07 RM-227, the Adobe Acrobat Reader on my E61i stopped working, i.e. will not open. I downloaded the software and tried re-installing, but E61i will not accept. I get the message "Cannot install

  • How to completely delete an app from notification center in IOS not just turn it off

    By mistake NDTV was added as a notification in my notification center. I went to preferences/notifications and I was able to turn it off but I want it completely gone which doesn't seem to be possible. Is it just poor programing or am I missing somet

  • IPSEC w/ 2 FCIP tunnels using a single gigE port

    A gig1/1 interface on a 9216i is servicing 2 FCIP tunnels (port 3225 & 3737) from 2 other 9216i switches. The FCIP ISL connecting to port 3225 has IPSEC configured and is working (trunking). The FCIP ISL connecting to port 3737 was trunking prior to

  • I no longer use Windows 2012 Essentials, can I sell my copy?

    I no longer use and uninstalled my copy of 2012 Windows Server Essentials from my home server, just overkill for a home server. I would like to know if it's possible to sell my copy of the software with key. Thanks, John