This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
How to use newlib with gcc
- From: "Petar Penchev" <ptr at melexis dot com>
- To: newlib at sources dot redhat dot com
- Date: Thu, 03 Jun 2004 14:18:56 +0300
- Subject: How to use newlib with gcc
- Organization: Melexis
Hello all,
I have succeded to build newlib.
But when I try to use it , I get error message.
I have properly configured and installed binutils v2.14 and GCC v4.4
the command I am using is:
abc-gcc sample1.c -lc -lgcc
And I get following error message :
/usr/local/lib/gcc/mlx16/3.4.0/../../../../mlx16/lib/libc.a(writer.o):
undefined
reference to `_write'
/usr/local/lib/gcc/mlx16/3.4.0/../../../../mlx16/lib/libc.a(closer.o):
undefined
reference to `_close'
/usr/local/lib/gcc/mlx16/3.4.0/../../../../mlx16/lib/libc.a(fstatr.o):
undefined
reference to `_fstat'
/usr/local/lib/gcc/mlx16/3.4.0/../../../../mlx16/lib/libc.a(lseekr.o):
undefined
reference to `_lseek'
/usr/local/lib/gcc/mlx16/3.4.0/../../../../mlx16/lib/libc.a(readr.o):
undefined
reference to `_read'
collect2: ld returned 1 exit status
I have checked libc.a and I have found that there is symbol _read in file
syscalls.o
Please tell me where I am wrong ?
Regards
--
Petar Penchev