comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: ADA-C++ Elaboration
Date: 2000/10/11
Date: 2000-10-11T00:00:00+00:00	[thread overview]
Message-ID: <8s2okk$2ge$1@nnrp1.deja.com> (raw)
In-Reply-To: 39E4DBB5.BEE55D9C@csd.sgi.com

In article <39E4DBB5.BEE55D9C@csd.sgi.com>,
  Pam Shimek <pshimek@csd.sgi.com> wrote:

> code?  In particular, I am having problems with const C++ variables
> failing to initialize

Hmm. I wonder if its a problem with C++ having a runtime that needs to
be initialized. You would have trouble like that if you tried calling
Ada from another language. But Ada provides a routine with a standard
link name that you can call to initialize everything.

Try changing the const variables to #defines, and see if you get the
right value. If that works, you either need to figure out how to call
C++'s initialization code directly, or you need to find some compile
option that causes those variables to get loaded with the right value.

>    procedure SUB_C;
>    pragma import(C, SUB_C);
>    pragma interface_name(SUB_C, "sub_c");

"pragma interface_name" is a Gnat-specific pragma to allow backwards
compatability with some old DECAda code. Unless that is your situation,
you should be using
   pragma import (C, SUB_C, "sub_c");
instead. Changing it won't fix your current problem though.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html
Day 6 of Free Europe


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-10-11  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-11  0:00 ADA-C++ Elaboration Pam Shimek
2000-10-11  0:00 ` Ted Dennison [this message]
2000-10-14  3:40 ` Robert Dewar
replies disabled

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