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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,701cccda09aefd03 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!wn11feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: ada import c function Reply-To: anon@anon.org (anon) References: <6568256f-39cd-4757-a630-fe6e4a9a82fc@l16g2000pra.googlegroups.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Wed, 29 Apr 2009 23:04:03 GMT NNTP-Posting-Host: 12.65.132.3 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1241046243 12.65.132.3 (Wed, 29 Apr 2009 23:04:03 GMT) NNTP-Posting-Date: Wed, 29 Apr 2009 23:04:03 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:5613 Date: 2009-04-29T23:04:03+00:00 List-Id: simon.j.wright >> gnat make use_of_import.adb should of been gnat compile use_of_import.adb which is the best way to learn Ada because one reason there are other Ada systems out there And newbees need to know they must compile then bind and finally link a program or library, unlike other languages. Plus the options can and do change from time to time that may interfer with the standard usage of "gnat make". And I was being nice and said the second way was quicky, actually its the LAZY way! In , sjw writes: >On Apr 29, 12:08=A0am, 459143...@att.net@worldnet.att.net (anon) wrote: >> there are basically two ways >> >> gcc -c imported_function.c -o imported_function.o >> gnat make use_of_import.adb > >You need -c on this command, or it will try to link and fail. > >> gnat bind use_of_import.ali >> gnat link use_of_import.ali imported_function.o >> >> or the quick way > ^^^^^ > right > >> gcc -c imported_function.c -o imported_function.o >> gnat make use_of_import.adb -largs imported_function.o