comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: using pragma export/adainit/adafinal with gnat...
Date: 02 Aug 2002 14:55:41 -0400
Date: 2002-08-02T19:04:17+00:00	[thread overview]
Message-ID: <uk7n9m6oi.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: dstanbro-DB7640.22215902082002@news-server.bigpond.net.au

Dale Stanbrough <dstanbro@bigpond.net.au> writes:

> I've read the gnat user's guide, and i have the
> pragma export set up fine. I can manage to create
> a program with a C main, and no elaboration required
> (pure packages).
> 
> However when i try to call on adainit and adafinal
> from the C program (after doing gnatbind -n), i keep 
> getting link errors with the symbols
> 
>    _adainit
>    _adafinal
> 
> not being found.
> 
> Any ideas on the exact series of commands required?

If there is no elaboration required, it may be that the Ada compiler
does not generate 'adainit' and 'adafinal'. But it probably does.

If there is no elaboration required, and you have no cleanup either,
you don't need to call 'adainit' and 'adafinal'. But it's a good habit
to get into :).

What C compiler are you using? Different C compilers have different
link name conventions.

Are you using gnatbind as recommended, and compiling the code it
generates, and linking with it? That's where 'adainit' and 'adafinal'
are defined.

-- 
-- Stephe



  reply	other threads:[~2002-08-02 18:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-02 12:21 using pragma export/adainit/adafinal with gnat Dale Stanbrough
2002-08-02 18:55 ` Stephen Leake [this message]
2002-08-02 21:43   ` Dale Stanbrough
2002-08-04 14:24     ` Robert Dewar
2002-08-02 21:43   ` Dale Stanbrough
replies disabled

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