This is the mail archive of the
newlib@sourceware.cygnus.com
mailing list for the newlib project.
How to use newlib
- To: newlib at sourceware dot cygnus dot com
- Subject: How to use newlib
- From: Sascha Ziemann <szi at aibon dot ping dot de>
- Date: 27 Apr 2000 18:18:59 +0200
Hi,
what is the right way to use newlib? I tried to compile a simple
hello world, but I get only errors:
gcc -Wall -I../newlib-1.8.2.inst/i686-pc-linux-gnu/include -c hello.c -o hello.o
gcc -L. -static hello.o libnosys.a -o hello
/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0xe): undefined reference to `__libc_init_first'
/usr/lib/crt1.o(.text+0x18): undefined reference to `_environ'
./libc.a(exit.o): In function `exit':
/home/olivia/szi/software/smbproxy/1.1.1/bootdisk/newlib-1.8.2/newlib.build/libc/stdlib/../../../newlib/libc/stdlib/exit.c:70: undefined reference to `_exit'
./libc.a(sbrkr.o): In function `_sbrk_r':
/home/olivia/szi/software/smbproxy/1.1.1/bootdisk/newlib-1.8.2/newlib.build/libc/reent/../../../newlib/libc/reent/sbrkr.c:61: undefined reference to `sbrk'
./libc.a(makebuf.o): In function `__smakebuf':
/home/olivia/szi/software/smbproxy/1.1.1/bootdisk/newlib-1.8.2/newlib.build/libc/stdio/../../../newlib/libc/stdio/makebuf.c:93: undefined reference to `isatty'
./libc.a(writer.o): In function `_write_r':
/home/olivia/szi/software/smbproxy/1.1.1/bootdisk/newlib-1.8.2/newlib.build/libc/reent/../../../newlib/libc/reent/writer.c:58: undefined reference to `write'
./libc.a(closer.o): In function `_close_r':
/home/olivia/szi/software/smbproxy/1.1.1/bootdisk/newlib-1.8.2/newlib.build/libc/reent/../../../newlib/libc/reent/closer.c:53: undefined reference to `close'
./libc.a(fstatr.o): In function `_fstat_r':
/home/olivia/szi/software/smbproxy/1.1.1/bootdisk/newlib-1.8.2/newlib.build/libc/reent/../../../newlib/libc/reent/fstatr.c:61: undefined reference to `fstat'
./libc.a(lseekr.o): In function `_lseek_r':
/home/olivia/szi/software/smbproxy/1.1.1/bootdisk/newlib-1.8.2/newlib.build/libc/reent/../../../newlib/libc/reent/lseekr.c:58: undefined reference to `lseek'
./libc.a(readr.o): In function `_read_r':
/home/olivia/szi/software/smbproxy/1.1.1/bootdisk/newlib-1.8.2/newlib.build/libc/reent/../../../newlib/libc/reent/readr.c:58: undefined reference to `read'
collect2: ld returned 1 exit status
make: *** [hello] Error 1
Sascha