comp.lang.ada
 help / color / mirror / Atom feed
* Re: gnat3.04a1 on Win95: linking a DLL
  1996-08-25  0:00 gnat3.04a1 on Win95: linking a DLL Terry J. Westley
@ 1996-08-25  0:00 ` Tom Griest
  1996-08-26  0:00 ` Ted Dennison
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Griest @ 1996-08-25  0:00 UTC (permalink / raw)



westley@buffnet.net (Terry J. Westley) writes:
>Newbie on Windows 95 searching for info on how to "link" a GNAT Ada program
>with a DLL.  Actually, I want to know how to tell the linker NOT to attempt
>to resolve a reference to a symbol I know to be in the DLL.

The linker must resolve dynamically linked objects to a dll
entry point.  Linking with a DLL is done in an almost transparent way.
You simply link with the existing .lib file.  Now if what you mean
is making a binding to an existing library, then you can
use pragma Import.  Use C as the calling convention unless
the calling convention is STDCALL in which case use stdcall.
Also, note that for DLL data you should use stdcall to insure
indirect references are generated.

-Tom
LabTek Corp.




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

* gnat3.04a1 on Win95: linking a DLL
@ 1996-08-25  0:00 Terry J. Westley
  1996-08-25  0:00 ` Tom Griest
  1996-08-26  0:00 ` Ted Dennison
  0 siblings, 2 replies; 3+ messages in thread
From: Terry J. Westley @ 1996-08-25  0:00 UTC (permalink / raw)



Newbie on Windows 95 searching for info on how to "link" a GNAT Ada program
with a DLL.  Actually, I want to know how to tell the linker NOT to attempt
to resolve a reference to a symbol I know to be in the DLL.

After searching Lycos, DejaNews, the GCC and GNAT docs, I can not find
anything on this subject.  Lots of stuff on how to create a DLL with GNAT,
but not on how to link with an existing one.  My last idea was that it
was a variation on pragma Interface, but couldn't find anything in
sem_prag.adb.

Any suggestions?

-- 
Terry J. Westley
westley@buffnet.net
http://www.buffnet.net/~westley/




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

* Re: gnat3.04a1 on Win95: linking a DLL
  1996-08-25  0:00 gnat3.04a1 on Win95: linking a DLL Terry J. Westley
  1996-08-25  0:00 ` Tom Griest
@ 1996-08-26  0:00 ` Ted Dennison
  1 sibling, 0 replies; 3+ messages in thread
From: Ted Dennison @ 1996-08-26  0:00 UTC (permalink / raw)



Terry J. Westley wrote:
> 
> Newbie on Windows 95 searching for info on how to "link" a GNAT Ada program
> with a DLL.  Actually, I want to know how to tell the linker NOT to attempt
> to resolve a reference to a symbol I know to be in the DLL.
> 
> After searching Lycos, DejaNews, the GCC and GNAT docs, I can not find
> anything on this subject.  Lots of stuff on how to create a DLL with GNAT,
> but not on how to link with an existing one.  My last idea was that it
> was a variation on pragma Interface, but couldn't find anything in
> sem_prag.adb.

I know this story well, as I went through it myself about a month ago. Here
are your options -

  o  Purchase a Microsoft Linker. One comes with Visaul C++ (about $300). 
     Install it, then rebuild LabTek's gnat.

  o  Search the net for a Win32 lib*.a file made from that DLL. The gnu linker
     uses lib*.a files, not *.DLL files. If its a Micro$oft DLL, you are probably
     out of luck.

  o  Create a lib*.a from the DLL. There are detailed instructions on how to
     do this in the GnuWin32 mailing list archives
     ( http://www.cygnus.com/ml/gnu-win32/ ). It is not a simple process, and
     is not even fully automated (unless you have access to a Linux machine).

     If anyone has a better method for making the lib's from DLL's, please 
     speak up!


Out of curiosity, which DLL do you want?
-- 
T.E.D.          
                |  Work - mailto:dennison@escmail.orl.mmc.com  |
                |  Home - mailto:dennison@iag.net              |
                |  URL  - http://www.iag.net/~dennison         |




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

end of thread, other threads:[~1996-08-26  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-08-25  0:00 gnat3.04a1 on Win95: linking a DLL Terry J. Westley
1996-08-25  0:00 ` Tom Griest
1996-08-26  0:00 ` Ted Dennison

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