Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!sun!mojo!steved From: steved%mojo@Sun.COM (Steve Dever) Newsgroups: comp.unix.wizards Subject: Re: Unix loader (ld) query Keywords: multiply defined Message-ID: <89245@sun.uucp> Date: 10 Feb 89 04:59:46 GMT References: <1247@ccnysci.UUCP> Sender: news@sun.uucp Reply-To: steved@sun.UUCP (Steve Dever) Organization: Sun Microsystems, Mountain View Lines: 28 In article <1247@ccnysci.UUCP> jeffrey@ccnysci.UUCP (Jeffrey L Bromberger) writes: [he wants to use his own version of a library routine] >4) I do a: > % f77 myprog.f myroutine.o -lstuff >5) The message I get from the fortran compiler is: > > myprog.f: > MAIN: > _myroutine_: ld:/usr/local/lib/libstuff.a(myroutine.o): multiply defined One thing that might be happening, is the libstuff.a(myroutine.o) defines one or more symbols that your version does not. If any of these symbols are referenced by anything else that is linked in, the linker will still bring in the version from the library, which causes the conflict with your routine. You need to change your version of myroutine.o so that it contains its own version of all public symbols in libstuff.a(myroutine.o). >Jeffrey L. Bromberger >System Operator---City College of New York---Science Computing Facility >Anywhere!{cmcl2,philabs,phri}!ccnysci!jeffrey jeffrey@ccnysci.BITNET --------------------------- Steve Dever steved@Sun.COM or Sun Microsystems sun!steved