comp.lang.ada
 help / color / mirror / Atom feed
* Ada Shared Libray on Linux
@ 2001-06-26 17:44 Rainer Welzel
  2001-06-26 19:17 ` Florian Weimer
  0 siblings, 1 reply; 6+ messages in thread
From: Rainer Welzel @ 2001-06-26 17:44 UTC (permalink / raw)


Hi,
how can I create a Shared Libray from Ada on Linux (gnatmake).
I wont to use some Ada Code inside Borland Kylix.

Thanks in advance
                               Rainer Welzel





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

* Re: Ada Shared Libray on Linux
  2001-06-26 17:44 Ada Shared Libray on Linux Rainer Welzel
@ 2001-06-26 19:17 ` Florian Weimer
  2001-06-27 22:19   ` David Hoffman
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Weimer @ 2001-06-26 19:17 UTC (permalink / raw)


"Rainer Welzel" <brigitte.welzel@t-online.de> writes:

> how can I create a Shared Libray from Ada on Linux (gnatmake).

I think the GtkAda sources contain an example.  The idea is to compile
some stub file which 'with's all units at (Ada) library level using
gnatmake and supply thie '-fPIC' flag.  The resulting object files can
be linked with 'gcc -shared -o libsuchandsuch.so *.o' or a similar
command.

> I wont to use some Ada Code inside Borland Kylix.

Don't forget to initialize the Ada environment from your Kylix
program.



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

* Re: Ada Shared Libray on Linux
  2001-06-26 19:17 ` Florian Weimer
@ 2001-06-27 22:19   ` David Hoffman
  2001-06-27 23:48     ` Gerhard Häring
  0 siblings, 1 reply; 6+ messages in thread
From: David Hoffman @ 2001-06-27 22:19 UTC (permalink / raw)


Hi,

> Don't forget to initialize the Ada environment from your Kylix
> program.

In general, how does one do this?



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

* Re: Ada Shared Libray on Linux
  2001-06-27 22:19   ` David Hoffman
@ 2001-06-27 23:48     ` Gerhard Häring
  2001-06-29  5:06       ` Simon Wright
  0 siblings, 1 reply; 6+ messages in thread
From: Gerhard Häring @ 2001-06-27 23:48 UTC (permalink / raw)


On 27 Jun 2001 15:19:55 -0700, David Hoffman <hoffman@insync.net> wrote:
>Hi,
>
>> Don't forget to initialize the Ada environment from your Kylix
>> program.
>
>In general, how does one do this?

It's described in detail in the GNAT users guide. You should call adainit and
adafinal respectively.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://highqualdev.com              public key at homepage
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



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

* Re: Ada Shared Libray on Linux
  2001-06-27 23:48     ` Gerhard Häring
@ 2001-06-29  5:06       ` Simon Wright
  2001-06-29 21:02         ` Florian Weimer
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Wright @ 2001-06-29  5:06 UTC (permalink / raw)


gerhard.nospam@bigfoot.de (Gerhard =?iso-8859-1?Q?H=E4ring?=) writes:

> On 27 Jun 2001 15:19:55 -0700, David Hoffman <hoffman@insync.net> wrote:
> >Hi,
> >
> >> Don't forget to initialize the Ada environment from your Kylix
> >> program.
> >
> >In general, how does one do this?
> 
> It's described in detail in the GNAT users guide. You should call
> adainit and adafinal respectively.

Is that going to cause interesting issues if you have >1 shared
library? or if you link an Ada .so with an Ada main?



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

* Re: Ada Shared Libray on Linux
  2001-06-29  5:06       ` Simon Wright
@ 2001-06-29 21:02         ` Florian Weimer
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Weimer @ 2001-06-29 21:02 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

>> It's described in detail in the GNAT users guide. You should call
>> adainit and adafinal respectively.
> 
> Is that going to cause interesting issues if you have >1 shared
> library? 

Yes, this can be a bit tricky, I think.

> or if you link an Ada .so with an Ada main?

In case of an Ada main, the binder takes care of this (at least if the
shared objects aren't treated as opaque).



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

end of thread, other threads:[~2001-06-29 21:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-26 17:44 Ada Shared Libray on Linux Rainer Welzel
2001-06-26 19:17 ` Florian Weimer
2001-06-27 22:19   ` David Hoffman
2001-06-27 23:48     ` Gerhard Häring
2001-06-29  5:06       ` Simon Wright
2001-06-29 21:02         ` Florian Weimer

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