comp.lang.ada
 help / color / mirror / Atom feed
From: ltpage2@gmail.com
Subject: use multiple Ada libraries from C
Date: 4 Apr 2006 11:07:08 -0700
Date: 2006-04-04T11:07:08-07:00	[thread overview]
Message-ID: <1144174028.858147.240200@e56g2000cwe.googlegroups.com> (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




                 reply	other threads:[~2006-04-04 18:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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