comp.lang.ada
 help / color / mirror / Atom feed
* Gnat doing DLL
@ 1998-09-26  0:00 Vagn Petersen
  1998-09-28  0:00 ` Jerry van Dijk
  0 siblings, 1 reply; 2+ messages in thread
From: Vagn Petersen @ 1998-09-26  0:00 UTC (permalink / raw)


I am in the process of writing a user interface to a number of
ADA-written functions.

The user interface is based on Windows and is written in Delphi 4.0
I know very little about Ada but assume that it is possible to compile
the various Ada packages to some sort of object-code which then may be
linked in an DLL-file.

Is it possible to make a DLL file from Gnat 3.10 ?
How do I propagate exceptions from such a DLL to Delphi ?

Vagn Petersen
Vagn Petersen
E-mail : vagn_sp@post1.tele.dk




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

* Re: Gnat doing DLL
  1998-09-26  0:00 Gnat doing DLL Vagn Petersen
@ 1998-09-28  0:00 ` Jerry van Dijk
  0 siblings, 0 replies; 2+ messages in thread
From: Jerry van Dijk @ 1998-09-28  0:00 UTC (permalink / raw)


Vagn Petersen (vagn_sp@post1.tele.dk) wrote:

: I am in the process of writing a user interface to a number of
: ADA-written functions.

: The user interface is based on Windows and is written in Delphi 4.0

What I understand is that:

a) you have a number of packages written in Ada
b) you want to develop a native Win32 user interface
c) you want to use GNAT 3.10p1 for compiling the Ada code
d) you want to use Delphi to build the user interface

: I know very little about Ada but assume that it is possible to compile
: the various Ada packages to some sort of object-code which then may be
: linked in an DLL-file.

What I understand is that your idea is to compile and link the Ada
packages as a DLL, to be able to call them from Delphi.

Unfortunately, building generally useful DLL's with GNAT 3.10p can
be done, but is a bit of a black art. You really need to know 
a lot about GNAT's evironment to pull it off. Building non-relocatable
DLL's can be done, but you have to take your changes regarding their
memory location. 

The easiest way in your particular situation would be to use the ObjectAda
compiler (not the free version, since it does not support generating DLL's).
Or to wait to see if GNAT 3.11p (who might be released is a couple of weeks)
will solve this problem.

Jerry.
-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada
-- Ada & Win32: http://stad.dsl.nl/~jvandyk




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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-26  0:00 Gnat doing DLL Vagn Petersen
1998-09-28  0:00 ` Jerry van Dijk

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