From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,64ea48f34d235bca X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: ADA-C++ Elaboration Date: 2000/10/11 Message-ID: <8s2okk$2ge$1@nnrp1.deja.com>#1/1 X-Deja-AN: 680328858 References: <39E4DBB5.BEE55D9C@csd.sgi.com> X-Http-Proxy: 1.0 x68.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Oct 11 22:12:42 2000 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (WinNT; I) Date: 2000-10-11T00:00:00+00:00 List-Id: In article <39E4DBB5.BEE55D9C@csd.sgi.com>, Pam Shimek 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.