comp.lang.ada
 help / color / mirror / Atom feed
From: chris <spamoff.danx@ntlworld.com>
Subject: Re: Application Size in Ada
Date: Thu, 15 Apr 2004 20:49:27 +0100
Date: 2004-04-15T20:49:27+01:00	[thread overview]
Message-ID: <bEBfc.10$vf2.2@newsfe1-win> (raw)
In-Reply-To: <c5mkkn$gk3$1@wotsit.aston.ac.uk>

Simon Lewis wrote:
> How is dynamic linking achieved in Ada?

It's not.  It's the compiler that deals with this and it depends on the 
compiler.  Assuming you're using GNAT, it has instructions on how to use 
compiler to produce libraries in the user guide.  I'm having some 
difficulty with this on Linux but am in the process of sorting it out.

> Are the Ada specific DLL's or can a DLL be used by any language as long 
> as you have the right 'bindings' (You will have to excuse my ignorance, 
> i am not very familiar with linking in Ada).

You can import DLLs written in many other compilers/languages fairly 
easily, providing they don't require any special runtime be setup prior 
to accessing them.  Going the other way, say from GNAT to C (gcc) is a 
little more difficult because you have to initialise the Ada runtime and 
the C won't necessarily understand the Ada types.  You have to provide a 
mapping between the Ada and C types using something like the package 
Interfaces.C as part of the library or a separate library wrapped around 
the Ada one.

The GNAT User Guide details this as well as how to create/use dlls.  Not 
sure exactly what section in the manual it is on Windows, but for Linux 
it's section 16 (gnat 3.15p).


Chris



  reply	other threads:[~2004-04-15 19:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-15 16:54 Application Size in ADA Simon Lewis
2004-04-15 18:13 ` Application Size in Ada Ludovic Brenta
2004-04-15 18:34   ` Simon Lewis
2004-04-15 19:49     ` chris [this message]
2004-04-15 19:52       ` chris
2004-04-15 20:12     ` Ludovic Brenta
2004-04-16  9:00       ` Simon Lewis
2004-04-15 18:13 ` Application Size in ADA Georg Bauhaus
2004-04-15 18:42 ` Martin Krischik
2004-04-15 19:26   ` Simon Lewis
2004-04-15 19:54   ` Martin Dowie
2004-04-15 21:26     ` Luke A. Guest
2004-04-15 22:25       ` Robert I. Eachus
2004-04-16  6:26       ` Martin Krischik
2004-04-15 21:22   ` Randy Brukardt
2004-04-16  6:22     ` Martin Krischik
2004-04-15 22:16 ` Robert I. Eachus
2004-04-16 16:31 ` Jano
replies disabled

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