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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.138.222 with SMTP id c91mr9422409ioj.138.1506942725290; Mon, 02 Oct 2017 04:12:05 -0700 (PDT) X-Received: by 10.157.15.100 with SMTP id 91mr185884ott.4.1506942725247; Mon, 02 Oct 2017 04:12:05 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!v62no2558216itd.0!news-out.google.com!p6ni3562itp.0!nntp.google.com!v62no2561042itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 2 Oct 2017 04:12:04 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:18f:900:f900:98c8:d16:d98b:b2a; posting-account=AvekzAoAAABj-TclKcOWQmXwA49MFPGX NNTP-Posting-Host: 2601:18f:900:f900:98c8:d16:d98b:b2a References: <9885a3fd-8ffa-4076-ba1f-db2f8035e0dc@googlegroups.com> <977c48e8-6b5b-4b0e-84a9-cd6447a9ddc3@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <15345d32-0610-444e-b611-f480bf60f9f0@googlegroups.com> Subject: Re: The best possible way to call a function in a shared library From: John Smith Injection-Date: Mon, 02 Oct 2017 11:12:05 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Body-CRC: 603040354 X-Received-Bytes: 2630 Xref: news.eternal-september.org comp.lang.ada:48271 Date: 2017-10-02T04:12:04-07:00 List-Id: On Monday, October 2, 2017 at 3:15:49 AM UTC-4, Dmitry A. Kazakov wrote: > On 02/10/2017 01:51, John Smith wrote: > > One more library related question. I'm trying to execute the following: > > > > $ gnatmake -L../../../interfaces foo_main.adb libInterfaceLib.a > > > > libInterfaceLib.a is located in the interfaces directory above. It's > > a static library. How can I include it at the command line? > > Use project files. > > Otherwise it is the -largs switch that passes options to the linker. > > -- > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de Hi, thanks for writing back. I'm able to use a project file, but it seems a little bit excessive in an instance when I have a small utility. This is what I tried again: gnatmake -L../../../bin/debug main_static.adb -largs libInterfaceLib.a And this is what I got: gnatmake : gnatmake: "debug" not found At line:1 char:1 + gnatmake -L../../../bin/debug .\main_static.adb -largs libsimpleLibs. ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (gnatmake: "debug" not found:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError I'm doing this in windows.