comp.lang.ada
 help / color / mirror / Atom feed
* use multiple Ada libraries from C
@ 2006-04-04 18:07 ltpage2
  0 siblings, 0 replies; only message in thread
From: ltpage2 @ 2006-04-04 18:07 UTC (permalink / raw)


The GNAT User's Guide indicates (in section 18.4, "Creating an Ada
Library to be Used in a Non-Ada Context") that more than one Ada
library can be used from C at one time.  I'm using GCC 3.2.3 on Linux
and cannot make this work.  I have two Ada libraries compiled into
shared objects.  I've created the necessary interface code as directed
in the User's Guide so I can call the initialization and finalization
routines created by gnatbind.  I can use either library okay by itself,
but I can't use them both from the same process.

What happens is this: when I call the second library's xxxxinit()
function, I get a

raised PROGRAM_ERROR : init.c:172

I looked at the GCC source and found that this error is raised when
__gnat_set_globals is called more than once with arguments that are
different.  This function is called by the elaboration routines created
by gnatbind.  However, all the arguments used by the two different
libraries are the same, so I don't know how such a thing could be
occurring.

Anyone have any ideas on this?  Thanks.

Matt




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-04 18:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-04 18:07 use multiple Ada libraries from C ltpage2

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