[OpenAFS-devel] AIX .exp files? do they have to be installed?

Jeffrey Hutzelman Jeffrey Hutzelman <jhutz@cmu.edu>
Thu, 11 Oct 2001 17:13:36 -0400 (EDT)


On Thu, 11 Oct 2001, Neulinger, Nathan wrote:

> Ok. When linking them, is there anything special about the order?
> 
> i.e. is
> 
> ar crv lib.a blah.o afs.exp
> ranlib lib.a
> 
> functionaly equivalent to
> 
> ar crv lib.a blah.o
> ranlib lib.a
> ar crv lib.a afs.exp
> 
> or does it have to be done in that special ordering?


I'm with Sam on this one; I have no reason to believe that .exp files can
be archive members.  But if the existing Makefiles are already doing that,
then it is probably OK.


Most platforms (particuarly Irix) are somewhat picky about library order
when linking; if X depends on Y then X must be listed on the link line
before Y.  However, creating an archive library is _not_ linking -- the
archive simply contains all the files you put into it, and the linker
considers each archive member file independently when searching the
archive.

For the most part, the order in which you add members to an archive is not
important.  The actual order of archive members may matter, but that's
what ranlib is for.  The important thing is to run ranlib _after_ you've
added all the archive members, since its job is to reorganize the archive
so that the linker will be able to use it.

-- Jeff