grep replacement (ld: undefined symbols)

der Mouse mouse at mcgill-vision.UUCP
Fri Jun 10 19:44:44 AEST 1988


In article <7207 at watdragon.waterloo.edu>, tbray at watsol.waterloo.edu (Tim Bray) writes:
> Scenario - you're trying to link 55 .o's together to build a program
> you don't know that well.  You're on berklix.  ld sez: "undefined:
> _memcpy".  You say: "who's doing that?".  The source is scattered
> inconveniently.  The obvious thing to do is:  grep -l _memcpy *.o

Doesn't anybody read the man pages any more?  The obvious thing is to
use the supplied facility: the -y option to ld.

% cc -o program *.o -y_memcpy
Undefined:
_memcpy
buildstruct.o: reference to external undefined _memcpy
copytree.o: reference to external undefined _memcpy
%

(I don't know how generally available this is.  You did say "berklix",
and I know this is in 4.3, but I don't know about other Berklices.)

					der Mouse

			uucp: mouse at mcgill-vision.uucp
			arpa: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.unix.wizards mailing list