comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: newbie: Problem with calling functions in shared library
Date: Mon, 19 Mar 2001 06:48:53 -0600
Date: 2001-03-19T06:48:53-06:00	[thread overview]
Message-ID: <Oent6.5115$A2.1281017@newsrump.sjc.telocity.net> (raw)
In-Reply-To: 01c0b063$c08079b0$668e4991@pc1944

This sounds like there is elaboration code in the Ada shared library unit
that is not
getting called before the subprograms in the library.

There may be a symbol like _<unit-name>___elabb and/or _<unit-name>___elabs,
that need to be called before calling any of the subprograms in the library.


"Fokker Space" <F.Space@fokkerspace.nl> wrote in message
news:01c0b063$c08079b0$668e4991@pc1944...
> I have a question regarding Ada and libraries with the use of GNAT. We
have
> the following situation under operating system IRIX:
>
> 1) Ada source without main routine -> compile with gnatmake or gcc -> Get
a
> <name>.o file
> 2) Link the <name>.o file to a shared library <name>.so with the use of
> gnatlink
> 3) An exe (from a C-source) loads the shared library with the
> dlopen-function.
> 4) The exe determines the places of procedures and functions in the shared
> library with the dlsym-function and calls them.
>
> The problem is that I keep getting crashes when calling the functions in
> the shared library. When I compile the same Ada source with the C-source
> into a seperate exe the problem doesn't occur. I suspect I am compiling or
> linking the shared library with the wrong flags or something like that.
>
> Does anybody know what to do it this situation or (even better) have a
> small example of a working program?
>
> Bart Schipperijn




  reply	other threads:[~2001-03-19 12:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-19 11:00 newbie: Problem with calling functions in shared library Fokker Space
2001-03-19 12:48 ` David C. Hoos, Sr. [this message]
2001-03-21 18:28 ` Stephen Leake
replies disabled

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