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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,840fead62ccf9fad X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Received: by 10.224.223.14 with SMTP id ii14mr12824970qab.3.1351322106676; Sat, 27 Oct 2012 00:15:06 -0700 (PDT) Received: by 10.52.65.33 with SMTP id u1mr4961928vds.18.1351322106612; Sat, 27 Oct 2012 00:15:06 -0700 (PDT) Path: r17ni73086299qap.0!nntp.google.com!e17no79919qar.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 27 Oct 2012 00:15:06 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=77.65.97.192; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 77.65.97.192 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1c65196f-68e4-4b50-8ad0-e9555d3f1b50@googlegroups.com> Subject: Re: pragma import (C, , ); -- import a constant value from C library From: Maciej Sobczak Injection-Date: Sat, 27 Oct 2012 07:15:06 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Date: 2012-10-27T00:15:06-07:00 List-Id: W dniu sobota, 27 pa=C5=BAdziernika 2012 01:06:14 UTC+2 u=C5=BCytkownik Sim= on Wright napisa=C5=82: > const double m_euler_for_gnat =3D M_EULER; You might want to declare this variable with external linkage (the logic is= : if you want to import something from Ada, then you have to export it from= C), so: extern "C" const double m_euler_for_gnat =3D M_EULER; --=20 Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com