From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: The best possible way to call a function in a shared library
Date: Wed, 4 Oct 2017 10:10:34 +0200
Date: 2017-10-04T10:10:34+02:00 [thread overview]
Message-ID: <or251p$1abl$1@gioia.aioe.org> (raw)
In-Reply-To: 27c92481-37ec-431a-8313-edc1b0b5e6ac@googlegroups.com
On 04/10/2017 04:10, John Smith wrote:
>> I did what you suggested and this is the error that I'm getting now:
>>
>> gnatmake : gnatmake: could not find the main ALI file
>> At line:1 char:1
>> + gnatmake -l../../../src .\main_static.adb -largs -L../../../bin/debug ...
>> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> + CategoryInfo : NotSpecified: (gnatmake: could...e main ALI file:String) [], RemoteException
>> + FullyQualifiedErrorId : NativeCommandError
>>
>> Why do the ALI files matter? Aren't the definitions in the *.ads files? Are the *.o file needed as well?
It is GNAT-specific. You can think about it this way. *.ali to *.ads is
what *.o to *.adb is. But *.o can be put into a library while *.ali
cannot because GNU linker does not know Ada.
> Also, I've tried this and got the following result:
>
> $ gnatmake -l../../../src main_static.adb -A../../../ali/debug -largs -L../../../bin/debug -lsimpleLibs
> gnatmake : gnatmake: missing source directory name
> At line:1 char:1
> + gnatmake -l../../../src main_static.adb -A../../../ali/debug -largs - ...
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : NotSpecified: (gnatmake: missing source directory name:String) [], RemoteException
> + FullyQualifiedErrorId : NativeCommandError
>
> Now the complaint is about the lack of a source file... *sigh*
gnatmake -l../../../src
-aL../../../ali/debug
main_static.adb
-largs -L../../../bin/debug -lsimpleLibs
That is why project files to be used. Otherwise you must fine tune
gnatmake options. That's the price to pay.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2017-10-04 8:10 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-01 21:06 The best possible way to call a function in a shared library John Smith
2017-10-01 23:51 ` John Smith
2017-10-02 7:15 ` Dmitry A. Kazakov
2017-10-02 11:12 ` John Smith
2017-10-02 11:32 ` Dmitry A. Kazakov
2017-10-02 22:44 ` John Smith
2017-10-03 7:14 ` Dmitry A. Kazakov
2017-10-03 11:32 ` John Smith
2017-10-03 13:43 ` Dmitry A. Kazakov
2017-10-03 23:28 ` John Smith
2017-10-04 2:10 ` John Smith
2017-10-04 8:10 ` Dmitry A. Kazakov [this message]
2017-10-04 11:23 ` John Smith
2017-10-04 11:48 ` Dmitry A. Kazakov
2017-10-04 11:54 ` John Smith
2017-10-04 11:59 ` Dmitry A. Kazakov
2017-10-04 12:04 ` John Smith
2017-10-04 12:47 ` Dmitry A. Kazakov
2017-10-04 15:03 ` Simon Wright
2017-10-04 23:24 ` John Smith
2017-10-05 23:55 ` John Smith
2017-10-06 2:21 ` John Smith
2017-10-06 6:46 ` Dmitry A. Kazakov
2017-10-06 11:30 ` John Smith
2017-10-06 13:26 ` Dmitry A. Kazakov
2017-10-06 18:57 ` Simon Wright
2017-10-06 19:18 ` Dmitry A. Kazakov
2017-10-07 2:47 ` John Smith
2017-10-07 3:57 ` John Smith
2017-10-07 8:25 ` Dmitry A. Kazakov
2017-10-07 11:52 ` Simon Wright
2017-10-07 12:57 ` John Smith
2017-10-07 13:19 ` Dmitry A. Kazakov
2017-10-07 13:28 ` John Smith
2017-10-10 3:39 ` John Smith
2017-10-10 13:15 ` Dmitry A. Kazakov
2017-10-11 0:38 ` John Smith
2017-10-11 1:18 ` Anh Vo
2017-10-11 1:22 ` John Smith
2017-10-11 1:40 ` Anh Vo
2017-10-11 7:08 ` Dmitry A. Kazakov
2017-10-11 12:09 ` John Smith
2017-10-11 13:43 ` Dmitry A. Kazakov
2017-10-11 22:25 ` Randy Brukardt
2017-10-11 22:57 ` John Smith
2017-10-13 0:38 ` John Smith
2017-11-06 6:25 ` Robert Eachus
2017-10-03 14:22 ` Dennis Lee Bieber
2017-10-02 7:30 ` Dmitry A. Kazakov
2017-10-11 14:31 ` John Smith
2017-10-11 15:50 ` John Smith
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox