about mb-gcc error???

Aug 16, 2007 1 Replies
[root@184pc140 bin]# ./mb-gcc hello.c /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

In news: snipped-for-privacy@x35g2000prf.googlegroups.com timestamped Wed, 15 Aug 2007 23:01:12 -0700, snipped-for-privacy@gmail.com posted: |----------------------------------------------------------------------| |"[root@184pc140 bin]# ./mb-gcc hello.c | |/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" | |----------------------------------------------------------------------|

You have invoked GCC without specifying with the -l switch where to find the library which contains write and outbyte and read and inbyte which need to be linked with your program.

You also seemed to have been logged in as root, which can be dangerous when not necessary.

Regards, Colin Paul Gloster

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required