cx_Oracle on cygwin

Jason Tishler jason at tishler.net
Mon Feb 11 09:16:51 EST 2002


Andy,

> Now everything is fine until we reach this stage;
> 
> gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-1.3.9-i686-
> 2.2/cx_Oracle.o -L/Tools/Lib -L/usr/lib/python2.2/config -loci -
> lpython2.2 -o build/lib.cygwin-1.3.9-i686-2.2/cx_Oracle.dll -s
> /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-
> cygwin/bin/ld: cannot find -loci
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
> 
> Reading 'man' for gcc this *seems* to be a problem because the linker is 
> looking for a file called liboci.a which, naturally, doesn't exist under 
> windows. I think I should be linking to oci.dll, but I don't know enough 
> to be sure.
> 
> Any suggestions, pointers or re-education would be most welcome.

You *should* be able to link directly with the DLL -- although, it is
recommended to link against the corresponding import library instead.

Create an import library, if necessary.  I recommend pexports:

    http://www.cygwin.com/ml/cygwin/2000-03/msg00694.html

Here are some (possibly useless) suggestions:

    o Try using the "-v" option to see what is really going on.
    o Did you supply the correct -L option to find -loci?
    o Try replacing -loci with oci.dll.

HTH,
Jason




More information about the Python-list mailing list