[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] File I/O fread() fwrite() undefined references



Hi,

I'm writing a program that alters a user file in uClinux.  In trying
to use fread() and fwrite() to read and write from the files.  I get
the following compiler messages from mb-gcc, but I do not get these
errors when I run gcc to compile it on my Linux box.

[root@localhost translate]# mb-gcc translate.c
translate.c: In function `sync':
translate.c:46: warning: comparison is always true due to limited
range of data type
translate.c: In function `main':
translate.c:517: warning: return type of 'main' is not `int'
/home/devel/uclinux/bin/mb_tools/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/lib/libc.a(write.o):
In function `write':
write.o(.text+0x34): undefined reference to `outbyte'
write.o(.text+0x58): undefined reference to `outbyte'
/home/devel/uclinux/bin/mb_tools/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/lib/libc.a(read.o):
In function `read':
read.o(.text+0x2c): undefined reference to `inbyte'
collect2: ld returned 1 exit status

Should I avoid fread() and fwrite() or is there some alternate library
that needed to be added when cross compiling with mb-gcc?

Thanks,

David
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/