public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Linking with ORACLE Pro*C/C++ Libraries on NT
@ 1997-09-04 21:18 Chris Kirgios
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Kirgios @ 1997-09-04 21:18 UTC (permalink / raw)
  To: 'gnu-win32@cygnus.com', 'Chris Kirgios'

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@cygnus.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@cygnus.com" with one line of text: "help".


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Linking with ORACLE Pro*C/C++ Libraries on NT
@ 1997-08-27  8:46 Chris Kirgios
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Kirgios @ 1997-08-27  8:46 UTC (permalink / raw)
  To: 'gnu-win32@cygnus.com'

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@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-09-04 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-04 21:18 Linking with ORACLE Pro*C/C++ Libraries on NT Chris Kirgios
  -- strict thread matches above, loose matches on Subject: below --
1997-08-27  8:46 Chris Kirgios

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).