This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: CYGNUS-WIN32 and Oracle OCI7.2 Library


Minh Le Cong[SMTP:Minh.Le_Cong@spacebel.be] wrote:
>As you may know, Personal Oracle 7.2 for NT include an API called OCI (Oracle Call Interface).
>This is used to access the Oracle database.
>This is a  C API . It consists of  some .h files , a DLL (ociw32.dll) and OCIw32.lib
>
>The ociw32.lib is intended for MSVC users.
>
>So my question is that how can I link my program with OCI library  if I use CYGNUS-WIN32 ?
> how gcc and ld deal with .LIB libary files ( not .a library file)?

In your case I think it might be easier to build a .a file using dlltool and
a .def file. Some time ago Valery Fine (Valeri.Faine@cern.ch) posted a program
called dumpexts, based on pedump, that creates a .def file from a .dll. Run
this on ociw32.dll and then run dlltool on the resulting .def file to make
a libociw32.a. Then you should be able to build your programs using -lociw32
on your link line.

This all assumes that the library file contains only import records, not extra
statically linked functions. From the looks of it, it seems like a good bet in
this case.

I can send you the source file dumpexts.c if you wish.

Colin.

-- Colin Peters - Saga Univ. Dept. of Information Science
-- colin@bird.fu.is.saga-u.ac.jp - finger for PGP public key
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]