comp.lang.ada
 help / color / mirror / Atom feed
From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk)
Subject: Re: Linking GCC/Gnat and Microsoft Visual C++ libs
Date: 1998/05/25
Date: 1998-05-25T00:00:00+00:00	[thread overview]
Message-ID: <EtIx3I.52@jvdsys.nextjk.stuyts.nl> (raw)
In-Reply-To: 6k9npe$qah$1@plug.news.pipex.net


Paul Hussein (paul.hussein@dial.pipex.com) wrote:

: Can anyone help. I am trying to link some Microsoft VC++ 5.0 libs with
: Gnat/GCC. At  run-time I get an error and am wondering if this link is
: legal.

: If not, how do I do link MS VC++ libs and Gnat/GCC.

As usual, it depends. 

Basically gcc uses the .a library format, not the .lib format. So if
you are using the gcc linker (ld) that won't work.

You might have success with a GNAT version previous to 3.10, since it
is rumored that these ports could use the microsoft linker. But that
would in all likelyhood involve some tricks.

If this .lib is an import library, it is possible that GNAT already includes
the .a format import libraries you need. Otherwise follow the instructions
on my homepage: http://stad.dsl.nl/~jvandyk to build a GNAT compatible
import library for the DLL.

If this is a normal code library, and you have the sources, see if you
can compile the code into a DLL, and build a GNAT import library for 
this DLL.

If this is a code library for which you have no sources, there is AFAIK
no way to use it directly. An option might then be to write some wrapper
code and compile this into a DLL, linking the .lib within the DLL.

Success,
Jerry.

-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada




      parent reply	other threads:[~1998-05-25  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-24  0:00 Linking GCC/Gnat and Microsoft Visual C++ libs Paul Hussein
1998-05-24  0:00 ` Larry Kilgallen
1998-05-25  0:00 ` Jerry van Dijk [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox