EmbDev.net

Forum: ARM programming with GCC/GNU tools Undefined reference error (yagarto/msys/gcc)


von superbird70 (Guest)


Rate this post
useful
not useful
Hi!  I have been trying to compile a file, but I keep getting error 
messages similar to the one below, complaining about undefined 
references to things like _read, _close, _lseek, etc...


How do I fix this?


C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\reent/.. 
/../../../../newlib-1.18.0//newlib/libc/reent/lseekr.c:58:  undefined 
reference to '_lseek'

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
superbird70 wrote:
>...complaining about undefined
> references to things like _read, _close, _lseek, etc...
FAQ. Read the newlib's manual 
(ftp://sources.redhat.com/pub/newlib/libc.pdf), section System Calls, 
check source-files called syscalls.c (or similar) for examples from 
Yagarto or other sources.

von Kenan Ö. (gladio)


Attached files:

Rate this post
useful
not useful
Did you already solved it?

I think those functions are not provided so what you have to do is to 
implement it. I had the same errors. I will attach my file which you can 
use.

von Hans M. (hereiam)


Rate this post
useful
not useful
Hi,

I trid to use you file but I get some errors.

Every from you as avoid warning marked line I get error messages.

For example:

Assiment to itself file = file


I use C not C++. Could this be a reason and how can I fix this in C?

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.