From: Stephen Leake <stephen_leake@acm.org>
Subject: Re: Multiple shared libraries with a single spec
Date: Sat, 05 Nov 2005 05:41:23 -0500
Date: 2005-11-05T05:41:23-05:00 [thread overview]
Message-ID: <ufyqb74x8.fsf@acm.org> (raw)
In-Reply-To: 1131119582.929654.323550@f14g2000cwb.googlegroups.com
"Lucretia" <lucretia9@lycos.co.uk> writes:
> Stephen Leake wrote:
>
>> > I have just created a test program which creates 2 shared libs (in
>> > separate directories with separate makefiles) and then created adalib
>> > and adainclude directories in which the lib, ali and ads files were
>> > linked to. I then built the test app which linked to the files in
>> > adalib and adainclude. I could then use a symlink to change the library
>> > used. This works, but I'm not too sure if it's the correct way to do
>> > this.
>>
>> It's one valid way, and has the advantage of being compiler
>> independent. But it isn't operating system independent; you can't do
>> this on Windows.
>
> This isn't compiler independent as the library generated won't be able
> to be used from another Ada compiler, i.e. the name mangling may not be
> the same.
What I meant was 'using file system symbolic links' is compiler
independent. My option of using GNAT project files is not compiler
independent.
Hmm. Maybe I misread what you wrote, and you didn't mean 'file system
symbolic links'.
> But you should be able to do this on Windows,
Windows does not support file system symbolic links.
>> > Has anyone else done this sort of thing with GNAT?
>>
>> I use GNAT project files for this; one project file per target. The
>> Source_Dirs value specifies what Ada bodies to use, by specifying the
>> directory search path. All objects are placed in one build directory;
>> one build directory per target.
>
> Hmmm, haven't used project files yet.
They are very nice. For example, they make it easy to specify compiler
options on a per-file basis (which I use to work around compiler bugs
:).
> I ask about this, because I'm generating 2 libs, each have slightly
> different ALI's and I was wondering whether this way would cause
> problems in the future?
Of course it can cause problems. But using per-target build
directories, and using project files, can solve those problems.
--
-- Stephe
next prev parent reply other threads:[~2005-11-05 10:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-04 12:28 Multiple shared libraries with a single spec Lucretia
2005-11-04 12:56 ` Niklas Holsti
2005-11-04 13:03 ` Lucretia
2005-11-04 13:22 ` Niklas Holsti
2005-11-04 15:43 ` Lucretia
2005-11-04 16:31 ` Pascal Obry
2005-11-04 17:36 ` Martin Krischik
2005-11-04 17:31 ` Martin Krischik
2005-11-04 21:55 ` Niklas Holsti
2005-11-04 13:04 ` Lucretia
2005-11-04 14:09 ` Stephen Leake
2005-11-04 15:53 ` Lucretia
2005-11-04 17:34 ` Martin Krischik
2005-11-05 10:41 ` Stephen Leake [this message]
2005-11-05 11:44 ` Lucretia
2005-11-05 14:17 ` Martin Krischik
2005-11-05 15:47 ` Stephen Leake
2005-11-05 16:00 ` Stefan Bellon
2005-11-06 11:57 ` Stephen Leake
2005-11-06 12:33 ` Stefan Bellon
2005-11-07 17:30 ` Lucretia
2005-11-07 23:42 ` Stephen Leake
2005-11-08 6:31 ` Stefan Bellon
2005-11-05 14:12 ` Martin Krischik
2005-11-05 14:22 ` Pascal Obry
2005-11-07 14:12 ` Frank J. Lhota
2005-11-07 17:31 ` Pascal Obry
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox