[En-Nut-Discussion] (no subject)

Harald Kipp harald.kipp at egnite.de
Mon Jan 5 20:39:00 CET 2004


>
>When I compile the pppc project, I have received the following error.
>
>
>
>C:\iccavr\bin\imakew -f pppc.mak
>     iccavr -c -IC:\iccavr\include\ -e -D_MCU_enhanced -DATMEGA  -l -g 
> -Mavr_enhanced  C:\ethernut\nut\app\pppc\pppc.c
>!W C:\ethernut\nut\app\pppc\pppc.c(297):[warning] source code specifies an 
>infinite loop
>!W C:\ethernut\nut\app\pppc\pppc.c(319):[warning] source code specifies an 
>infinite loop
>     iccavr -o pppc -LC:\iccavr\lib\ -g -ucrtatmega.o 
> -bfunc_lit:0x8c.0x20000 -dram_end:0x10ff -bdata:0x100.0x10ff 
> -dhwstk_size:16 -beeprom:1.4096 -fihx_coff -ucrtnut.o 
> c:\iccavr\lib\nutinit.o -S2 @pppc.lk   -lnutpro -lnutnet -lnutos -lnutdev 
> -lnutcrt -lcatmega
>!E <library>(7849): multiple define: '_chat_report'
>C:\iccavr\bin\imakew.exe: Error code 1
>Done: there are error(s). Exit code: 1
>
>
>
>When I remove the #include <dev/chat.h> line from the code, it compiles.
>
>
>
>Is something wrong?

Yes, there is indeed. chat_report should not have been
defined in an include file.

Add

u_char *chat_report;

to chat.c and replace the entry in chat.h with

extern u_char *chat_report;

Now I'm wondering why GCC didn't detect that problem.

Harald




More information about the En-Nut-Discussion mailing list