Archiving problems with g++

T.Day at ucl-cs.UUCP T.Day at ucl-cs.UUCP
Thu Aug 10 23:33:31 AEST 1989


From: Tim Day <T.Day at uk.ac.ucl.cs>

Having finally got around to putting various classes and 'genclassed'
derivatives into libraries, I am now having severe problems with the
truncation of the object file name to 15 characters within the archive file.

e.g for some graphics stuff I have
TransformationMatrix44.o, TransformationMatrix44.SLList.o,
TransformationMatrix44.Stack.o, TransformationMatrix44.SLStack.o
Unfortunately ar truncates all these to TransformationM so only one file
gets archived, resulting in all sorts of undefined symbol messages at link time

Solutions seem to be:
1) Set ARFLAGS = qv so objects are appended without replacement.  Unfortunately
this seems to mess up dependency checking, and subsequent makes of the library
will keep appending copies of the .SLList.o, .Stack.o and .SLStack.o files
presumably because (Gnu) make compares the date of the archived
TransformationMatrix44.o with the genclassed object (which was built after
the first file was archived).

2) Use shorter file names than class names... too much of a compromise.
I like having file name = or close to class name.  Besides, I have make rules
of the form %.SLList.o: etc invoking genclass which would have problems
with this.

3) Use shorter class names... but with all the suffixes a class can aquire,
they have to get fairly short.  Even 'class Particle' produces archiving
problems when I have Particle.Ptr.SLList.o and Particle.Ptr.SLBag.o

Has anyone else had similar problems ?  What did you do ?
+-----------------------------------------------------------------------------+
Tim Day                           | Meet every second in life as challenge;
Department of Photogrammetry      | Respond fully to whatever happens
UCL, Gower St., London  WC1E 6BT  |  without anxiety, or complaint, or clinging
+-----------------------------------------------------------------------------+



More information about the Comp.unix.questions mailing list