public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Chris Kirgios <ckirgios@ajboggs.com>
To: "'gnu-win32@cygnus.com'" <gnu-win32@cygnus.com>,
	"'Chris Kirgios'" <ckirgios@ajboggs.com>
Subject: RE: Linking with ORACLE Pro*C/C++ Libraries on NT
Date: Thu, 04 Sep 1997 21:18:00 -0000	[thread overview]
Message-ID: <01BCB95B.1566EA80@stones.ajboggs.com> (raw)

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".

             reply	other threads:[~1997-09-04 21:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-04 21:18 Chris Kirgios [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-08-27  8:46 Chris Kirgios

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01BCB95B.1566EA80@stones.ajboggs.com \
    --to=ckirgios@ajboggs.com \
    --cc=gnu-win32@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).