I am using the Yagarto recompilation of the GCC toolchain. I am trying to compile this simple program to get an .elf
executable:
int main(void)
{
return(0);
}
When typing the command arm-none-eabi-gcc main.c
I get the error message
c:/yagarto/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): In function
exit': C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\stdlib/../../../../../newlib-1.19.0/newlib/libc/stdlib/exit.c:65: undefined reference to
_exit' collect2: ld returned 1 exit status
What am I doing wrong?
return
is not function and you can writereturn 0;
- i486