comp.lang.ada
 help / color / mirror / Atom feed
* DLL and Ada
@ 1998-01-31  0:00 Colson Eric
  1998-01-31  0:00 ` Nick Roberts
  0 siblings, 1 reply; 4+ messages in thread
From: Colson Eric @ 1998-01-31  0:00 UTC (permalink / raw)



Hello,

I would like to known if it's possible to use in a ADA source a DLL wrote
with C , under Win95.
If there's a solution, could you explain how to proceed?

By advance

Eric






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

* Re: DLL and Ada
  1998-01-31  0:00 DLL and Ada Colson Eric
@ 1998-01-31  0:00 ` Nick Roberts
  1998-02-01  0:00   ` Jerry van Dijk
  1998-02-01  0:00   ` Torsten Neuer
  0 siblings, 2 replies; 4+ messages in thread
From: Nick Roberts @ 1998-01-31  0:00 UTC (permalink / raw)



The answer is definitely "yes".  Ada provides pragmas and library packages
which make this sort of thing possible: see the Ada Reference Manual -- as
well as your compiler's guides -- for details.  If your Ada compiler
doesn't support the use of DLLs, then you might be advised to seek another
compiler.

-- 

== Nick Roberts ================================================
== Croydon, UK                       ===========================
==                                              ================
== Proprietor, ThoughtWing Software                   ==========
== Independent Software Development Consultant            ======
== Nick.Roberts@dial.pipex.com                              ====
== Voicemail & Fax +44 181-405 1124                          ===
==                                                            ==
==           I live not in myself, but I become               ==
===          Portion of that around me; and to me             ==
====         High mountains are a feeling, but the hum        ==
=======      Of human cities torture.
===========                             -- Byron [Childe Harold]


Colson Eric <colson13@club-internet.fr> wrote in article
<6av7sf$9h3$1@newsfeeds.grolier.fr>...
> Hello,
> 
> I would like to known if it's possible to use in a ADA source a DLL wrote
> with C , under Win95.
> If there's a solution, could you explain how to proceed?





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

* Re: DLL and Ada
  1998-01-31  0:00 ` Nick Roberts
@ 1998-02-01  0:00   ` Jerry van Dijk
  1998-02-01  0:00   ` Torsten Neuer
  1 sibling, 0 replies; 4+ messages in thread
From: Jerry van Dijk @ 1998-02-01  0:00 UTC (permalink / raw)



> <6av7sf$9h3$1@newsfeeds.grolier.fr>...

> > I would like to known if it's possible to use in a ADA source a DLL
wrote
> > with C , under Win95.
> > If there's a solution, could you explain how to proceed?

On my homepage (http://stad.dsl.nl/~jvandyk) there is an explanation on
how to do this with GNAT, including new tool to generate the needed 
module definition files from a DLL.

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





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

* Re: DLL and Ada
  1998-01-31  0:00 ` Nick Roberts
  1998-02-01  0:00   ` Jerry van Dijk
@ 1998-02-01  0:00   ` Torsten Neuer
  1 sibling, 0 replies; 4+ messages in thread
From: Torsten Neuer @ 1998-02-01  0:00 UTC (permalink / raw)



Nick Roberts wrote:
> 
> The answer is definitely "yes".  Ada provides pragmas and library packages
> which make this sort of thing possible: see the Ada Reference Manual -- as
> well as your compiler's guides -- for details.  If your Ada compiler
> doesn't support the use of DLLs, then you might be advised to seek another
> compiler.
> 
> Colson Eric <colson13@club-internet.fr> wrote in article
> <6av7sf$9h3$1@newsfeeds.grolier.fr>...
> > Hello,
> >
> > I would like to known if it's possible to use in a ADA source a DLL wrote
> > with C , under Win95.
> > If there's a solution, could you explain how to proceed?

It is not a matter of whether the compiler supports DLLs or not.
You can import functions from Win DLLs with every validated Ada
compiler that runs under Win. The only thing you need is a tool
that extracts the library symbols from that DLL, i.e. makes a
linkable library.

Step 1:  Produce a symbol library from the DLLs you want to use.
Step 2:  Write and Ada binding to that library using the proper
	 Ada pragmas to import the symbols. Don't forget to put
	 a pragma Linker_Options in the binding or else you will
	 have to link the symbol library manually.

Torsten




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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-31  0:00 DLL and Ada Colson Eric
1998-01-31  0:00 ` Nick Roberts
1998-02-01  0:00   ` Jerry van Dijk
1998-02-01  0:00   ` Torsten Neuer

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