Guest
#1170978
Hello all, i've a little problem to build an C++ project with WinARM. I can compile all sources. But when I would link the objects files arm-elf-c++ stops with some error messages like this: C:/DOKUME~1/kbrandt/LOKALE~1/Temp/cc2jbaaa.o: In function `_start':../system_source/crt0.S:(.text+0xe0): multiple definition of `_start' c:/winarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/crt0.o:c: /winarms/newlib-1.14.0/libgloss/arm/crt0.S:67: first defined here c:/winarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib\libc.a(ma llocr.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/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib\libc.a(fr eer.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/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib\libc.a(ma kebuf.o): In function `__smakebuf':makebuf.c:(.text+0x44): undefined reference to `_fstat_r' :makebuf.c:(.text+0xe4): undefined reference to `isatty' c:/winarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib\libc.a(st dio.o): In function `__sread':stdio.c:(.text+0x1c): undefined reference to `_read_r' c:/winarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib\libc.a(st dio.o): In function `__swrite':stdio.c:(.text+0x78): undefined reference to `_lseek_r' :stdio.c:(.text+0x9c): undefined reference to `_write_r' c:/winarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib\libc.a(st dio.o): In function `__sseek':stdio.c:(.text+0xc0): undefined reference to `_lseek_r' c:/winarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib\libc.a(st dio.o): In function `__sclose':stdio.c:(.text+0xf8): undefined reference to `_close_r' After I've added the -v option to the compiler call, I found this in the compiler output: Configured with: ../../gcc-4.0.2/configure --enable-languages=c,c++ --enable-interwork --enable-multilib --with-gcc --with-gnu-ld --with-gnu-as --with-stabs --disable-shared --disable-threads --disable-win32-registry --disable-nls --target=arm-elf --with-newlib --prefix=c:/WinARM -v My first question is: What will be call here? I can't find configure executable in the WinARM folder. The next question is: This call of configure has the option --with-newlib. In my mind, this is the reason for the undefined references. How can I avoid this? Last but not least: For my project I've to develop and link my own startup code. You can this above as following output: C:/DOKUME~1/kbrandt/LOKALE~1/Temp/cc2jbaaa.o: In function `_start':../system_source/crt0.S:(.text+0xe0): multiple definition of `_start' But when I look in the comiler output, I can the mysterious things. The Linker bind also startup code from WinARM/lib folder to the project. This results accidentally in multiple definition of '_start'. But isn't the worst. Only I've now two startup code in my project. What is my mistake here? I dont know? Any suggestions are welcome. Karsten