From: Simon Wright <simon@pushface.org>
Subject: Re: interfacing with c object link gnatmake link problem
Date: Mon, 11 Nov 2019 15:32:35 +0000
Date: 2019-11-11T15:32:35+00:00 [thread overview]
Message-ID: <lytv7actt8.fsf@pushface.org> (raw)
In-Reply-To: h2rht3FtofuU1@mid.individual.net
Niklas Holsti <niklas.holsti@tidorum.invalid> writes:
> On 2019-11-10 23:15, Simon Wright wrote:
>> Alain De Vos <devosalain71@gmail.com> writes:
>>
>>> I try to interface to a c library.
[...]
>> % gnatmake mytest.adb -largs maaltwee.o
>>
>> (-largs is followed by arguments to be passed to the linker)
>
> My habit is to add
>
> pragma Linker_Options ("mylibrary.o");
>
> to the Ada source file that imports the C functions. Then there is no
> need to add options to the gnatmake command.
When it's not a small demo/test program, my habit is to write a gprbuild
project file. Or maybe a makefile.
It won't worry me, but what if the object file turns out to be
mylibrary.obj? Much easier to change these sorts of OS-dependent things
outside Ada.
prev parent reply other threads:[~2019-11-11 15:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-10 21:04 interfacing with c object link gnatmake link problem Alain De Vos
2019-11-10 21:15 ` Simon Wright
2019-11-10 22:39 ` Niklas Holsti
2019-11-11 14:17 ` Shark8
2019-11-11 15:32 ` Simon Wright [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox