* C code
@ 1996-06-30 0:00 Henry the mild mannered janitor
1996-06-30 0:00 ` Robert Dewar
1996-07-01 0:00 ` Pascal Obry
0 siblings, 2 replies; 6+ messages in thread
From: Henry the mild mannered janitor @ 1996-06-30 0:00 UTC (permalink / raw)
Can GNAT 3.04 compile standalone C code that's independant of an .adb
file?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: C code
@ 2003-02-07 21:48 chris.danx
2003-02-08 4:59 ` sk
0 siblings, 1 reply; 6+ messages in thread
From: chris.danx @ 2003-02-07 21:48 UTC (permalink / raw)
sk wrote:
> Also, for DLLI, the "init" and "fini" are red-herrings (not
> deliberate)
> these are only issues for building a dynamic-library, not the loading
> of them thru DLLI.
So all I need to do is to detect whether the library is an Ada lib or
not and if it is call Adainit upon load and adafinal upon close?
> Hopefully this is better
I just got a wee bit of time to work on this and hadn't done anything
for a while, so I'm sorry my reply is a bit late. Unfortunately I
killed the wrong partition trying to install Gentoo and the binding as
was became one with the ether (killed the backup partition :( ). I've
almost finished rewriting it and will do some examples including some
with GtkAda first chance I get.
Bye,
Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: C code
2003-02-07 21:48 chris.danx
@ 2003-02-08 4:59 ` sk
2003-02-08 16:08 ` Robert A Duff
0 siblings, 1 reply; 6+ messages in thread
From: sk @ 2003-02-08 4:59 UTC (permalink / raw)
To: comp.lang.ada mail to news gateway
Hi,
> So all I need to do is to detect whether the library is an Ada lib or
> not and if it is call Adainit upon load and adafinal upon close?
I guess you could, but I wouldn't.
For the DLLI interface, leave it to the called library user to know
whether the library containes "adainit" and "adafinal" because it
was developed in Ada with GNAT.
For an Ada library (GNAT developed since other compilers probably
do things differently) to be useful and transparent to C callers,
then one would try to associate the "adainit" and "adafinal" to the
automatic "init" and "fini" functions. These functions are called
by the dynamic-loader when you do a "dlopen()"
In general, I would not try to put "adainit" and "adafinal" in the
dlli package, let the user worry about it.
--
--
-- Merge vertically for real address
--
------------------------------------
-- s n p @ t . o
-- k i e k c c m
------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-02-08 16:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-30 0:00 C code Henry the mild mannered janitor
1996-06-30 0:00 ` Robert Dewar
1996-07-01 0:00 ` Pascal Obry
-- strict thread matches above, loose matches on Subject: below --
2003-02-07 21:48 chris.danx
2003-02-08 4:59 ` sk
2003-02-08 16:08 ` Robert A Duff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox