Unix loader (ld) query
Steve Dever
steved%mojo at Sun.COM
Fri Feb 10 14:59:46 AEST 1989
In article <1247 at ccnysci.UUCP> jeffrey at 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 at ccnysci.BITNET
---------------------------
Steve Dever steved at Sun.COM
or
Sun Microsystems sun!steved
More information about the Comp.unix.wizards
mailing list