[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] File I/O fread() fwrite() undefined references
- To: microblaze-uclinux <microblaze-uclinux@xxxxxxxxxxxxxx>
- Subject: [microblaze-uclinux] File I/O fread() fwrite() undefined references
- From: "David Montminy" <dpmontminy@xxxxxxxxx>
- Date: Mon, 20 Nov 2006 17:53:15 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ElgzJ0nKp7vR3yReNDU1JU1Y0RgF98B0MhoTPljdOmWoW/t0b46EhvlfVxI82SNn4rpgZyd4Ux2YTrMvD89/xn4SkSG5Bld0lMZCRkh5kqx1B/YaQzMln6LriFuR7YIgGUIjsIhz4pLqhZBKkoZnUpebgKYSqmpSktZd/FX+P4A=
- Reply-to: microblaze-uclinux@xxxxxxxxxxxxxx
- Sender: owner-microblaze-uclinux@xxxxxxxxxxxxxx
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/