comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: ada import c function
Date: Wed, 29 Apr 2009 23:04:03 GMT
Date: 2009-04-29T23:04:03+00:00	[thread overview]
Message-ID: <D15Kl.178168$4m1.104395@bgtnsc05-news.ops.worldnet.att.net> (raw)
In-Reply-To: f35ff4f7-8653-4010-9368-be0a0893b0d1@y6g2000prf.googlegroups.com

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 <f35ff4f7-8653-4010-9368-be0a0893b0d1@y6g2000prf.googlegroups.com>, sjw <simon.j.wright@mac.com> 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




  reply	other threads:[~2009-04-29 23:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28 20:45 ada import c function s. ashen
2009-04-28 21:18 ` Maciej Sobczak
2009-04-28 21:40 ` sjw
2009-04-28 23:08 ` 459143320
2009-04-29 16:00   ` s. ashen
2009-04-29 19:03   ` sjw
2009-04-29 23:04     ` anon [this message]
2009-04-30 20:48       ` sjw
2009-04-30 21:32         ` Gautier
2009-04-30 23:42           ` linking with g++ (was: ada import c function) Björn Persson
2009-05-01  5:48             ` linking with g++ Gautier
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox