delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/09/06/16:21:03

From: ckirgios AT ajboggs DOT com (Chris Kirgios)
Subject: RE: Linking with ORACLE Pro*C/C++ Libraries on NT
6 Sep 1997 16:21:03 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <01BCB95B.1566EA80.cygnus.gnu-win32@stones.ajboggs.com>
Mime-Version: 1.0
Original-To: "'gnu-win32 AT cygnus DOT com'" <gnu-win32 AT cygnus DOT com>,
"'Chris Kirgios'"
<ckirgios AT ajboggs DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by cygnus.com id OAA23767
Original-Sender: owner-gnu-win32 AT cygnus DOT com

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: 	'gnu-win32 AT cygnus DOT com'
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
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019