[En-Nut-Discussion] Multiple definition of free and malloc
Stephan Uhle
stephan.uhle at alcatel.de
Mon Jun 13 11:58:14 CEST 2005
Hi everybody,
when I try to link my ethernut program I get a linker error that malloc
and free are defined twice(in libc.a and libnutcrt.a).
I'm linking my program this way:
avr-gcc -mmcu=atmega128 -Wl,--defsym=main=0,-Map=./obj/myprog.map,--cref
-L~/nut/lib ./obj/*.o ~/nut/lib/nutinit.o -lnutos -lnutcrt -lnutdev
-lnutfs -lnutnet -lnutos -lnutpro -lnutcpp -o obj/myprog.elf
I already tried to change the order of the -l arguments and I also tried
to use -nostdlib and -nodefaultlibs but that produced a lot of undefined
definitions.
thanks for your help,
stephan
--
More information about the En-Nut-Discussion
mailing list