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.2 required=5.0 tests=BAYES_00,URI_TRY_3LD autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.N5M2DXr2fJIsm61cKlUWUQ.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: interfacing with c object link gnatmake link problem Date: Sun, 10 Nov 2019 21:15:48 +0000 Organization: Aioe.org NNTP Server Message-ID: References: <7ff91b06-4667-4fa4-8abf-6d172b033557@googlegroups.com> NNTP-Posting-Host: N5M2DXr2fJIsm61cKlUWUQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) Cancel-Lock: sha1:OHYoPEDXa2gnH9/fWEj6t9KybDo= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:57543 Date: 2019-11-10T21:15:48+00:00 List-Id: Alain De Vos writes: > I try to interface to a c library. > The docs, > https://learn.adacore.com/courses/intro-to-ada/chapters/interfacing_with_c.html > > How to inform gnatmake that it should link to mylibrary.o ? > > I solve it currently by calling gnatlink explicitly after running gnatmake , > but maybe there is a nicer solution. > % gnatlink mytest.ali ./maaltwee.o % gnatmake mytest.adb -largs maaltwee.o (-largs is followed by arguments to be passed to the linker)