comp.lang.ada
 help / color / mirror / Atom feed
* Dynamic linking using Gnat Ada
@ 1996-09-05  0:00 Martin Lorentzon
  1996-09-05  0:00 ` John Howard
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Martin Lorentzon @ 1996-09-05  0:00 UTC (permalink / raw)



I'd like to dynamically link an Ada program using Gnat Ada.

Is it possible? Any hints on how to?

\Martin.




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

* Re: Dynamic linking using Gnat Ada
  1996-09-05  0:00 Dynamic linking using Gnat Ada Martin Lorentzon
@ 1996-09-05  0:00 ` John Howard
  1996-09-06  0:00 ` David C. Hoos, Sr.
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: John Howard @ 1996-09-05  0:00 UTC (permalink / raw)
  To: Martin Lorentzon


On 5 Sep 1996, Martin Lorentzon wrote:
> I'd like to dynamically link an Ada program using Gnat Ada.
> Is it possible? Any hints on how to?

There is the Ada 95 route and then there are other ways.  The Ada 95 route 
is a "distributed program" where a system may have:
1) a main subprogram on one processor using data store elsewhere; or 
2) many cooperating main subprograms running on the same or different
   processors.

You would use a compiler that supports the Distributed Systems annex in 
order to interface with some underlying communication subsystem.  The
communication subsystem might be provided by an operating system or 
another software product.  GNAT (v3.05) currently does not utilize a 
particular communication subsystem and also none is provided.  According 
to the GNAT v3.05 Features text file:
"ANNEX E. DISTRIBUTED SYSTEMS
  (fully implemented)
  (this refers to the compiler part, stub generation and the pragmas)"

An Ada 95 for OS/2, DOS, or Windows that provides a communication 
subsystem packaged within a prevalent dynamic link library (DLL) format 
would maximize proliferation of support for the Distributed Systems annex.
The 32 bit DLL format is supported by several operating systems.  A DLL is
not dependent upon any particular programming language.

Creating a DLL requires a capable compiler and a linker.  I have not tried 
to use GNU tools to create a DLL.  Because of familiarity I use non-GNU
tools to create DLL's.  Several GNAT for OS/2 users create GNAT programs
that dynamically link with their custom DLL's.

It is possible to ignore the Distributed Systems annex and just use other
ways to enable remote procedure calls (such as linking with custom DLL's).
But the Distributed Systems annex provides more framework than just remote 
procedure calls.  See package System.RPC for details.

-- John Howard <jhoward@sky.net>               -- Team Ada  Team OS/2 --





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

* Re: Dynamic linking using Gnat Ada
  1996-09-05  0:00 Dynamic linking using Gnat Ada Martin Lorentzon
  1996-09-05  0:00 ` John Howard
  1996-09-06  0:00 ` David C. Hoos, Sr.
@ 1996-09-06  0:00 ` Samuel Tardieu
  1996-09-07  0:00 ` Jon S Anthony
  1996-09-07  0:00 ` Geert Bosch
  4 siblings, 0 replies; 6+ messages in thread
From: Samuel Tardieu @ 1996-09-06  0:00 UTC (permalink / raw)
  To: John Howard


>>>>> "John" == John Howard <jhoward@sky.net> writes:

John> GNAT (v3.05) currently does not utilize a particular
John> communication subsystem and also none is provided.

None is provided in the main distribution, but ACT-Europe maintains
and distributes under the GPL an implementation of the PCS for
GNAT. You can find it on

           ftp://ftp.cs.nyu.edu/pub/gnat/dsa/

It currently runs on Solaris, Linux and SunOS. The next release will
run on many other systems which support tasking and sockets.

  Sam
-- 
  Samuel Tardieu -- sam@ada.eu.org




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

* Re: Dynamic linking using Gnat Ada
  1996-09-05  0:00 Dynamic linking using Gnat Ada Martin Lorentzon
  1996-09-05  0:00 ` John Howard
@ 1996-09-06  0:00 ` David C. Hoos, Sr.
  1996-09-06  0:00 ` Samuel Tardieu
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: David C. Hoos, Sr. @ 1996-09-06  0:00 UTC (permalink / raw)



Hi Martin,
On which platform/OS do you wish to dynamically link.  The right answer
depends on that.

Martin Lorentzon <emwson@emw.ericsson.se> wrote in article
<vmk9u9f55f.fsf@emw.ericsson.se>...
> I'd like to dynamically link an Ada program using Gnat Ada.
> 
> Is it possible? Any hints on how to?
> 
> \Martin.
> 




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

* Re: Dynamic linking using Gnat Ada
  1996-09-05  0:00 Dynamic linking using Gnat Ada Martin Lorentzon
                   ` (2 preceding siblings ...)
  1996-09-06  0:00 ` Samuel Tardieu
@ 1996-09-07  0:00 ` Jon S Anthony
  1996-09-07  0:00 ` Geert Bosch
  4 siblings, 0 replies; 6+ messages in thread
From: Jon S Anthony @ 1996-09-07  0:00 UTC (permalink / raw)



In article <qw6afv4ar4f.fsf@gargantua.enst.fr> Samuel Tardieu <sam@ada.eu.org> writes:

> It currently runs on Solaris, Linux and SunOS. The next release will
> run on many other systems which support tasking and sockets.

Would that happen to include NT?

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178

617.484.3383
jsa@organon.com





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

* Re: Dynamic linking using Gnat Ada
  1996-09-05  0:00 Dynamic linking using Gnat Ada Martin Lorentzon
                   ` (3 preceding siblings ...)
  1996-09-07  0:00 ` Jon S Anthony
@ 1996-09-07  0:00 ` Geert Bosch
  4 siblings, 0 replies; 6+ messages in thread
From: Geert Bosch @ 1996-09-07  0:00 UTC (permalink / raw)



Martin Lorentzon (emwson@emw.ericsson.se) wrote:
`` I'd like to dynamically link an Ada program using Gnat Ada.
   Is it possible? Any hints on how to? ''

It is possible. In general you can proceed the same way you would do
dynamic linking with gcc C/C++. Just remember that you have to call
an initialization function before accessing Ada stuff from another
language. After you're finished using the Ada objects you'll have to
call the finalization function.

If you want to link the run-time library dynamically, that's more
difficult. Since GNAT has no documentation on the interface between
the application code and the run-time library, building a dynamically
linked version of the RTL is much harder. I do have one for OS/2, but
it might change with each version of GNAT and that is the reason I don't
want to distribute it.

Regards,
   Geert
-- 
E-Mail: geert@sun3.iaf.nl    
      ``I think there is a world market for maybe five computers.''
        Thomas Watson,  chairman of IBM, 1943





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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-09-05  0:00 Dynamic linking using Gnat Ada Martin Lorentzon
1996-09-05  0:00 ` John Howard
1996-09-06  0:00 ` David C. Hoos, Sr.
1996-09-06  0:00 ` Samuel Tardieu
1996-09-07  0:00 ` Jon S Anthony
1996-09-07  0:00 ` Geert Bosch

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