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,4cabfb8e49247533 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder2.news.jippii.net!feeder1.news.jippii.net!reader1.news.jippii.net!53ab2750!not-for-mail From: Niklas Holsti Organization: Tidorum Ltd User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Multiple shared libraries with a single spec References: <1131107328.981560.222350@g43g2000cwa.googlegroups.com> <1131109401.159287.109900@g47g2000cwa.googlegroups.com> In-Reply-To: <1131109401.159287.109900@g47g2000cwa.googlegroups.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 04 Nov 2005 15:22:12 +0200 NNTP-Posting-Host: 81.17.205.61 X-Complaints-To: newsmaster@saunalahti.com X-Trace: reader1.news.jippii.net 1131110796 81.17.205.61 (Fri, 04 Nov 2005 15:26:36 EET) NNTP-Posting-Date: Fri, 04 Nov 2005 15:26:36 EET Xref: g2news1.google.com comp.lang.ada:6186 Date: 2005-11-04T15:22:12+02:00 List-Id: Lucretia wrote: > Niklas Holsti wrote: > >>I'm working on an Ada program that has different versions, as in >>your example. I put the different versions of the package bodies >>(and specifications, too, for some packages) in different >>source-code directories, as you do. To build a specific version of >>the program, I list the source-code directories for the desired >>version in ADA_INCLUDE_PATH (and also in ADA_OBJECTS_PATH, but I >>think this is unnecessary for me) and then run "gnatmake" in a >>directory dedicated to this version. The .ali and .o files and the >>executable go in this version-specific directory. I don't use >>symlinks, just ADA_INCLUDE_PATH. > > > The problem i've found is, if the .adb file is in the same directory as > the .ali, .o and the shared lib, the source code will be linked > directly into the final executable. The executable still requires the > shared lib, but it doesn't actually use it. How do you get around this? Ah - when you say "shared lib", do you mean a *dynamically* linked library? I thought you just meant a library that is used by several programs or different versions of a program, but has different implementations for different environments. Sorry for my misunderstanding. I don't have any experience with making dynamically linked libraries. In my case, the choice of versions influences many parts of the program, not just the libraries but also their client packages, so linking the libraries dynamically would not make sense. > Do you dump the ali and shared lib to a different directory? It may not be relevant to your problem, as I misunderstood your aims, but for this program I never have the .adb in the same directory as the .ali and .o. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .