Xref: utzoo comp.unix.wizards:9229 comp.unix.questions:7510 Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: grep replacement (ld: undefined symbols) Keywords: Consistency Message-ID: <1152@mcgill-vision.UUCP> Date: 10 Jun 88 09:44:44 GMT References: <7882@alice.UUCP> <5630@umn-cs.cs.umn.edu> <6866@elroy.Jpl.Nasa.Gov> <7207@watdragon.waterloo.edu> Organization: McGill University, Montreal Lines: 22 In article <7207@watdragon.waterloo.edu>, tbray@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@mcgill-vision.uucp arpa: mouse@larry.mcrcim.mcgill.edu