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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3e5cb326bf672965 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Sun, 01 Oct 2006 11:27:33 -0500 From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: GNAT, shared libraries, building in different directories...madness! References: <1159469642.836410.101620@i42g2000cwa.googlegroups.com> <87lko19qjw.fsf@ludovic-brenta.org> <1159713893.645892.314970@m7g2000cwm.googlegroups.com> Date: Sun, 01 Oct 2006 18:28:18 +0200 Message-ID: <87sli880gt.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:EEi+uMSHjf0IuqKSaZ8WOW3fzb0= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 62.235.225.13 X-Trace: sv3-XrYJFMuXrxTbTR0c4y1O5MWgchY8kovDaTGCq/nyb0+WrHkyx04Y8q9G5jQsFhHAJcuBGdnl0jXlcd9!bMYzzV8CN6VcJ4ygTKO03vBSonKaMahZiAjqBPl8npLtWJZtwHS7fGbBe4+CnaNBz1JMoekxTw== X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:6823 Date: 2006-10-01T18:28:18+02:00 List-Id: Simon Wright writes: > "sphinxmoro" writes: > >> Hello, >> 1) I am not quite sure of what you mean whth the flag >> "-gntafno" >> Can you explain the meaning of the flag (or is this a typo?) > > That must be -gnatfno (gnatmake -v will tell you the meanings, though > I expect you knew that). Actually I meant -gnatafno (a=assertions enabled, f=full errors, n=inlining across units, o=full range checks). Sorry for the typo. You can, of course, adjust compiler options to taste. >> 2) When I have to use a library, ACT suggest to add a path like: >> >> package Linker is >> for Default_Switches ("ada") use ("-g", "--largs", >> "-Ld:/dev/ada/utils/lib", "-lmyutils"); >> end Linker; >> >> This is working, and in your example you don't specify such a path. >> What do you think? I don't like adding "-L" in project files, because that would make them inflexible. Also, remember that the plan is to install the project file in /usr/share/ada/adainclude as part of the library's development package (presumably, libmyutils-dev), and the library in /usr/lib, as part of the run-time library package (presumably, libmyutils0). If the library is in /usr/lib, there is no need for "-L" in the first place. If you build a program that depends on the library before the library has been installed in /usr/lib, the best is to pass "-L" directly to gnatmake, like so: gnatmake -Pfoo -largs -Lbuild where "build" is a directory relative to the Makefile. Maybe I should have explained that better in my first reply. Now, since you seem to be running on an operating system that has no policy as regards library placement, maybe it is necessary to specify a library path at some point. But the OP did mention Linux, and to me this implies the GNU linker and toolchain, and some sort of conformance to the Filesystem Hierarchy Standard. Come to think of it, it is really better not to write the linker path in the project file, because the linker path tends to be system-depedent, whereas the project file is platform-neutal. I prefer to provide the necessary "glue" in the Makefile. -- Ludovic Brenta.