comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Question on setting up libraries
Date: Sun, 16 Jul 2006 15:32:10 +0200
Date: 2006-07-16T15:32:10+02:00	[thread overview]
Message-ID: <87y7ut1xr9.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 1153055835.051381.88680@m73g2000cwd.googlegroups.com

randomm@mindless.com writes:
> Actually my preference is generally to tolerate a larger executable
> in order to make packaging simpler and reduce external dependencies
> for the user.  So your first explanation about the .a seems to be
> most helpful.  I understand the tradeoff, but I prefer to be able to
> guarantee my environment to the extent possible rather than to bet
> on the questionable valuable of new library versions, at least this
> is how I did it "back in the old country."

That's fine for a one-off program, but not if you want to provide a
complete platform or suite of programs.  YYMV.

[...]

> so in my trivial test scenario it seems that I need the .o files.  I
> haven't had time to go through all the materials you and the other
> people have suggested so perhaps this is all explained therein.
>
> I haven't proven it but it certainly looks as though the libAdaCurses.a
> contains all the necessary object files so I should find out how to use
> those and then I can remove all the .o files from adalib.

Yes.  See below.

>> That's why, for example, the Debian Policy for Ada *forbids*
>> library packages from supplying .o files at all.  They must supply
>> the .a static library and the .so shared library instead.
>
> That sounds like a much better idea.  I hope I'll be able to
> utilitize these properly shortly.

To link statically, if libAdaCurses.a is in the current directory:

gnatmake first -g -cargs -gnatfloqv -O -largs libAdaCurses.a

To link dynamically, if you have libAdaCurses.so in /usr/lib:

gnatmake first -g -cargs -gnatfloqv -O -largs -lAdaCurses

> I should note that the libAdaCurses.a was also not copied by the
> make install.  So it still seems a problem.

Yes, that's a second bug in the installation of AdaCurses.

-- 
Ludovic Brenta.



  parent reply	other threads:[~2006-07-16 13:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1152998024.669864.21010@35g2000cwc.googlegroups.com>
2006-07-15 21:24 ` Question on setting up libraries Ludovic Brenta
2006-07-16  0:26 ` Jeffrey R. Carter
2006-07-16  8:45 ` Simon Wright
2006-07-16 12:17   ` Ludovic Brenta
2006-07-16 11:49 ` Martin Krischik
     [not found]   ` <1153052044.114830.184030@h48g2000cwc.googlegroups.com>
2006-07-16 12:30     ` Ludovic Brenta
     [not found]       ` <1153055835.051381.88680@m73g2000cwd.googlegroups.com>
2006-07-16 13:32         ` Ludovic Brenta [this message]
2006-07-16 20:06       ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox