You are not logged in.
Hi everybody, I started to write some script for my raspberry, but, because of performance gap, I decided to use C instead of python. The point is that i do not have a GUI installed and in any case it will be near impossible to use a IDE on a first generation raspberry. I wanted to use Eclipse on my laptop to compile for ARM.
I've installed arm-none-eabi-gcc pakage using pacman, but it doesn't compile even a simple Hello World.
arm-none-eabi-gcc test.c -o test
generate these errors
/usr/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
/usr/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_sbrk'
/usr/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text._write_r+0x24): undefined reference to `_write'
/usr/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): In function `_close_r':
closer.c:(.text._close_r+0x18): undefined reference to `_close'
/usr/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c:(.text._lseek_r+0x24): undefined reference to `_lseek'
/usr/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r':
readr.c:(.text._read_r+0x24): undefined reference to `_read'
/usr/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c:(.text._fstat_r+0x20): undefined reference to `_fstat'
/usr/lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c:(.text._isatty_r+0x18): undefined reference to `_isatty'
collect2: error: ld returned 1 exit status
PS: I duplicate the thread in Other Architectures but i do not know how to close it.
Last edited by Adam_h94 (2017-03-16 00:55:04)
Offline
I dust binned the other thread. In the future, please use the report link on the thread and ask the moderators to move it for you. Thanks.
I am not much on setting up cross compilers, and I am not a huge fan of large IDEs like eclipse. I would consider using emacs with auto complete and gdb on the target. Others here will suggest Vim.
The problems you are encountering are because you using arm-none. You should be using arm-linux (I think). The none target does not know about Linux kernel calls .
http://stackoverflow.com/questions/1379 … ux-gnueabi
Last edited by ewaller (2017-03-15 21:29:49)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I cross compile on Arch ARM (master) to my x86_64 box all the time. See: https://wiki.archlinux.org/index.php/Distcc#Arch_ARM
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Thanks a lot for the hints. Finally i installed arm-linux-gnueabihf-gcc, and now everything works fine.
Offline