Problems with Oracle OCI library - help please

Discussion in 'C++' started by RTJ, Dec 14, 2004.

  1. RTJ

    RTJ Guest

    I have experienced problems with Oracle OCI library. I was unable to properly
    link
    OCI library using gcc. Probably gcc compiler provided with SFU is unable to
    link
    native Windows library.
    Oracle provides OCI dll (named oci.dll) and additionally OCI stub library
    (oci.lib)
    for Microsoft MSVC compiler. I have attempted to link dora with both OCI dll
    and
    OCI lib. Link with OCI lib resulted with many strange linker errors
    (probably gcc does not recognize the "lib" file format).
    Link with OCI dll i have performed in two ways:
    -- using options: -L$(ORACLE_HOME)/bin -loci
    - gcc produced error message that library is not found
    -- providing full library pathname in command line:
    $(ORACLE_HOME)/bin/oci.dll
    - gcc produced error messages about unresolved symbols, although these
    symbols are located in this library.

    If somebody did successfully link any native Windows library with any program
    written for SFU, please inform me how to link such library properly.

    On the other hand, I couldn't bring to work the second compiler provided with
    SFU
    -- the Microsoft compiler. Maybe somebody was able to compile
    a C++ source file or create a shared library using it ?
    Which compiler are you using ?


    --
    Regards
    Romek
    => http://www.rtj.republika.pl <= my photo gallery
    RTJ, Dec 14, 2004
    #1
    1. Advertising

  2. RTJ wrote:
    >
    > I have experienced problems with Oracle OCI library. I was unable to properly
    > link
    > OCI library using gcc. Probably gcc compiler provided with SFU is unable to
    > link
    > native Windows library.
    > Oracle provides OCI dll (named oci.dll) and additionally OCI stub library
    > (oci.lib)
    > for Microsoft MSVC compiler. I have attempted to link dora with both OCI dll
    > and
    > OCI lib.


    You need libraries which are built for gcc in order to use them.
    There is no such thing as 'native library format'. Each compiler
    has its own way to build a library and to name things in the library.

    --
    Karl Heinz Buchegger
    Karl Heinz Buchegger, Dec 14, 2004
    #2
    1. Advertising

  3. RTJ

    Sanjay Rana

    Joined:
    Sep 27, 2006
    Messages:
    1
    Can you specify that Which version of SFU you are using?
    This functionality of linking to DB dlls like oci.dll is now provided by Win2k3 R2 release where SUA (Subsystem for Unix based applications) is an optional component. This feature is called mixed mode and both gcc as well as c89 can be used to generate an unix application linking to OCI.dll.
    Sanjay Rana, Sep 27, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dima
    Replies:
    0
    Views:
    315
  2. RTJ
    Replies:
    4
    Views:
    720
  3. Krivenok Dmitry
    Replies:
    3
    Views:
    734
  4. Nicolas Couturier

    oci adpater and Oracle

    Nicolas Couturier, Nov 13, 2007, in forum: Ruby
    Replies:
    4
    Views:
    197
    Nicolas Couturier
    Nov 16, 2007
  5. Pradeepta Swain

    how to connect 2 oracle using ruby-oci-8

    Pradeepta Swain, Dec 28, 2007, in forum: Ruby
    Replies:
    1
    Views:
    139
    lianliming
    Dec 28, 2007
Loading...

Share This Page