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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c1bdceb867926fdb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!j8g2000yqd.googlegroups.com!not-for-mail From: Ada novice Newsgroups: comp.lang.ada Subject: Re: Interfacing Ada with C Date: Sun, 25 Jul 2010 09:18:41 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4acf7f59-2675-4498-8d95-35d01bc1e3af@j8g2000yqd.googlegroups.com> References: <0ee9eec7-6024-4fb8-8df0-f65c146e4b84@i28g2000yqa.googlegroups.com> <143ef70b-7e74-426b-a621-a5fd157849be@x21g2000yqa.googlegroups.com> <18zszx6sjlloa$.k5nohxp9k27i$.dlg@40tude.net> <91c174e6-c359-4bf5-b284-d93a725ad09d@c10g2000yqi.googlegroups.com> <0dadd6b6-452d-43e9-b0b9-374b5106b298@t2g2000yqe.googlegroups.com> NNTP-Posting-Host: 193.11.22.91 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1280074721 30578 127.0.0.1 (25 Jul 2010 16:18:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 25 Jul 2010 16:18:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j8g2000yqd.googlegroups.com; posting-host=193.11.22.91; posting-account=Rr9I-QoAAACS-nOzpA-mGxtAlZ46Nb6I User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:12546 Date: 2010-07-25T09:18:41-07:00 List-Id: On Jul 25, 4:26=A0pm, Simon Wright wrote: > > Then you need to add > =A0 =A0with System; use System; > to Dmitry's code. > > I think Internal will sort itself out when you've fixed the type-related > withs as above. > Thanks. Now, imsl.ad(b,s) compile fine. Now to make the code work: Do I need to have a C file also? The IMSL library won't activate by itself. I have a main file in Ada as testmatrix.adb: with Imsl; use Imsl; procedure TestMatrix is Values : Complex_Array :=3D F_Eig_Gen (((8.0, 1.0, 5.0), (4.0, 4.0, 2.0), (18.0, 5.0, 7.0))); begin null; end TestMatrix; So I compile gnatmake -c imsl.adb gnatmake -c testmatrix.adb And then work on the .ali files gnatbind -n imsl.ali testmatrix.ali I'll need a C file to do the linking. What to put in the C file? Also > Personally I'd have called Internal imsl_f_eig_gen if only so I'd > remember what was what! but YMMV. Do you mean renaming the procedure imsl.adb to Internal imsl_f_eig_gen.adb . Sorry this part is not clear to me. Thanks YC