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 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-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!open-news-network.org!eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Interfacing Ada with C Date: Sun, 25 Jul 2010 18:47:09 +0100 Organization: A noiseless patient Spider Message-ID: 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> <4acf7f59-2675-4498-8d95-35d01bc1e3af@j8g2000yqd.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sun, 25 Jul 2010 17:47:09 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="21890"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Ko2OtAjzgba0nF5udEOJ+6WHzTGnH9Ko=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:QoDs8zp3qEve0rJ7tArD1QFjtKQ= sha1:WTi1AfUt4pTDEEBj3HG84TfN7iY= Xref: g2news1.google.com comp.lang.ada:12551 Date: 2010-07-25T18:47:09+01:00 List-Id: Simon Wright writes: > You don't need to use "-c". Try just > > gnatmake testmatrix.adb > > It'll compile testmatrix.adb and imsl.adb for you, do the bind, and try > to do the link, but you'll get a linker error because it can't find > imsl_f_eig_gen. > > Above, you wrote a C test: [...] > and when you built that you must have told GCC where to find the IMSL > library: something like the "-limsl" below. > > gcc testprogram.c -o testprogram -limsl > > You can do exactly the same with gnatmake: > > gnatmake testmatrix.adb -largs -limsl Of course, the above are all command-line-oriented and rather Unix-y at that. Sorry I don't know how to deal with .lib files and .dlls, and can't check any suggestions I might make out because I'm not running on Windows ... I suspect others will be able to help more.