Subject: RE: Linking with ORACLE Pro*C/C++ Libraries on NT
From: [email-masked] (Chris Kirgios)

6 Sep 1997 16:21:03 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 8bit
Original-To: "[email-masked]'" <[email-masked]>,
        "'Chris Kirgios'"
	 <[email-masked]>
X-MIME-Autoconverted: from quoted-printable to 8bit by cygnus.com id OAA23767
Original-Sender: [email-masked]

If you are interested, I finally got this to work a couple of days ago. So here it is.

g++ -o program.exe main.o object1.o -L{library paths} -lmylib1 ... -lg++ -lstdc++ -lcygwin -lsqllib80

Note that during my previous compilations, all I was doing was

g++ ... -lg++ -lsqllib80

The trick is that you MUST link with libstdc++ and libcygwin (in that order)  before the 'foreign' libraries.  The reason appears to be that, unless your linking order is different, the sqllib80.a library forces cygwin.dll to relocate due to collision during dynamic library loading (although I might be wrong here). I do not know whether this will work with 'any' non-cygwin32 dll or library, but I think it will. 

        Thank you to all of you who replied to my message and especially to Colin Peters for his invaluable support (his was the idea about the relocatable cygwin dll).

----------
From: 	Chris Kirgios
Sent: 	Wednesday, August 27, 1997 11:45 AM
To: 	[email-masked]'
Subject: 	Linking with ORACLE Pro*C/C++ Libraries on NT

I have a g++ compiled library that contains embeded SQL. It was precompiled with Oracle's Pro*C/C++ compiler on Windows NT.  In order to link that library with my executable I need to link with Oracle's sqllib80.lib (or sqllib80.dll, which is NOT a .a library).  When I run gdb I get a bunch of DLL relocation errors. 

Question: Does anyone know how to 'transform' the Oracle DLL (by the way, Oracle provides copies of it only for Vicual C++ and Borland C++ compilers) into a gnu-win32 library? Has anyone else come across the same or similar problem? I suspect that this might be a more general problem for situations where source code is not available but DLLs (created with non-cygwin32 compilers) are.

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".