comp.lang.ada
 help / color / mirror / Atom feed
From: dweller@dfw.net (David Weller)
Subject: Re: Calling GNAT Ada 95 from C
Date: 1996/04/10
Date: 1996-04-10T00:00:00+00:00	[thread overview]
Message-ID: <4kg7io$i4h@dfw.dfw.net> (raw)
In-Reply-To: 316ACAF2.5488@ix.netcom.com

In article <316ACAF2.5488@ix.netcom.com>,
Vance Christiaanse  <cintech@ix.netcom.com> wrote:
>I got an undefined symbol, "__priority_main" I think it was.
>
>Is it possible with GNAT for a C main to call Ada code that
>includes a task?  If so, could someone please tell me how to
>do it?  Thanks in advance.  I tried several things but could
>not get it to work.
>

Hmm, seems I've seen this problem before... :-)

In your C code, you need to add this little routine:

int __main_priority ()
{
  return -1;
}

I think this is being fixed in the next GNAT release, but Robert Dewar
told me nobody had discovered it before because nobody had yet tried
to call an Ada task from a C program.  I had asked Robert about this a
week ago, and he gave me a very prompt reply (with the code above
included :-)









      parent reply	other threads:[~1996-04-10  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-09  0:00 Calling GNAT Ada 95 from C Vance Christiaanse
1996-04-10  0:00 ` Robert Dewar
1996-04-10  0:00 ` David Weller [this message]
replies disabled

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