delorie.com/archives/browse.cgi | search |
> Date: Sun, 25 Nov 2001 18:57:59 +0000 > From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk> > > ./../../hostbin/dxegen.exe ./../../bin/emu387.dxe __emu_entry src/emu387.o > id_emu.o src/emudummy.o -L../../lib c:/djgpp/lib/gcc-lib/djgpp/3.02/libgcc.a > -lc c:/djgpp/lib/gcc-lib/djgpp/3.02/libgcc.a > ld -X -S -r -o dxe__tmp.o -L./../../lib src/emu387.o id_emu.o > src/emudummy.o -L../../lib c:/djgpp/lib/gcc-lib/djgpp/3.02/libgcc.a -lc > c:/djgpp/lib/gcc-lib/djgpp/3.02/libgcc.a -T dxe.ld > ./../../lib/libc.a(_write.o)(.text+0x0):_write.c: multiple definition of > `_write' > src/emudummy.o(.text+0x10):emudummy.c: first defined here > make.exe: *** [../../bin/emu387.dxe] Error 1 Does it help to make src/emudummy.o be the first object file in the link command line, before dxe__tmp.o and emu387.o? I think the problem is that some of the other object files calls _write (indirectly) because of the -pg used to compile library functions. By the time the linker sees emudummy.o, it has already pulled in _write from libc.a, so it barfs. If you force it to use the definitions from emudummy.o, it will never need the one from libc.a.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |