EmbDev.net

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


Author: superbird70 (Guest)
Posted on:

Rate this post
0 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'

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 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.

Author: Kenan Özdemir (gladio)
Posted on:
Attached files:

Rate this post
0 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.

Author: Hans Mueller (hereiam)
Posted on:

Rate this post
0 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?

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.