Steve Franks wrote: > Anyone know what lib's contain the following? I can't seem to locate > it. Or, it could be a link ordering problem, I suppose. I get the > same errors when adding either a call to sprintf or std::stringstream > > Thanks, > Steve > > C:\WinARM\arm-elf\lib\libc.a(mallocr.o): In function > `_malloc_r':mallocr.c:(.text+0x430): undefined reference to `_sbrk_r' > :mallocr.c:(.text+0x5ec): undefined reference to `_sbrk_r' > C:\WinARM\arm-elf\lib\libc.a(syswrite.o): In function > `write':syswrite.c:(.text+0x24): undefined reference to `_write_r' > C:\WinARM\arm-elf\lib\libc.a(freer.o): In function > `_malloc_trim_r':mallocr.c:(.text+0x48): undefined reference to > `_sbrk_r' > :mallocr.c:(.text+0x70): undefined reference to `_sbrk_r' > :mallocr.c:(.text+0xb4): undefined reference to `_sbrk_r' > C:\WinARM\arm-elf\lib\libc.a(makebuf.o): In function > `__smakebuf':makebuf.c:(.text+0x44): undefined reference to `_fstat_r' > :makebuf.c:(.text+0xe4): undefined reference to `isatty' > C:\WinARM\arm-elf\lib\libc.a(stdio.o): In function > `__sread':stdio.c:(.text+0x1c): undefined reference to `_read_r' > C:\WinARM\arm-elf\lib\libc.a(stdio.o): In function > `__swrite':stdio.c:(.text+0x78): undefined reference to `_lseek_r' > :stdio.c:(.text+0x9c): undefined reference to `_write_r' > C:\WinARM\arm-elf\lib\libc.a(stdio.o): In function > `__sseek':stdio.c:(.text+0xc0): undefined reference to `_lseek_r' > C:\WinARM\arm-elf\lib\libc.a(stdio.o): In function > `__sclose':stdio.c:(.text+0xf8): undefined reference to `_close_r' > make: *** [main.elf] Error 1 I think these are references to newlib stubs. They are linked in because sprintf somehow (directly or indirectly) depends on them. BTW, if you're looking for a light-weight (s)printf, take a look at this http://menie.org/georges/embedded/index.html Bertrik
Message
Re: [lpc2000] link problem.
2006-02-17 by Bertrik Sikken
Attachments
- No local attachments were found for this message.