[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] C++ output problems
I am attempting to do a simple hello world with C++. I have tried
1) std::cout
there is no STL that I could find, as per a previous post that was never answered
2) printf
#include <stdio.h>
int main ( int argc, char **argv ) {
printf( "hi\n" );
return 0;
}
Produces the following errors
/home/chatgris/chatgris/realmicro/uClinux-dist/include/include -fno-builtin -Wl,-elf2flt -nostartfiles /home/chatgris/chatgris/realmicro/uClinux-dist/lib/crt0.o -L/home/chatgris/chatgris/realmicro/uClinux-dist/lib -o test test.o -lc /usr/local/microblaze-elf-tools/bin/../lib/gcc-lib/microblaze/2.95.3-4/./libgcc.a /usr/local/microblaze-elf-tools/bin/../lib/gcc-lib/microblaze/2.95.3-4/./../../../../microblaze/lib/libc.a
/home/chatgris/chatgris/realmicro/uClinux-dist/lib/libc.a(fflush.o): In function `fflush':
/home/chatgris/chatgris/realmicro/uClinux-dist/uClibc/libc/stdio/stdio.c:2216: multiple definition of `fflush'
/usr/local/microblaze-elf-tools/bin/../lib/gcc-lib/microblaze/2.95.3-4/./../../../../microblaze/lib/libc.a(fflush.o)(.text+0x0): first defined here
3) write
#include <unistd.h>
int main ( int argc, char **argv ) {
write( 0, "hi", 2 );
return 0;
}
Produces the following errors
/home/chatgris/chatgris/realmicro/uClinux-dist/user/pth/test.cpp:6: undefined reference to `outbyte'
/home/chatgris/chatgris/realmicro/uClinux-dist/user/pth/test.cpp:6: undefined reference to `outbyte'
The exact same programs compile if test.cpp is renamed to test.c and mb-gcc is used instead of mb-g++
Any feedback, even feedback that says "We know this is not working" would be greatly appreciated.
The makefile I am using for both programs is as follows.
Thanks, Joshua Moore-Oliva
EXEC = test
OBJS = test.o
all: $(EXEC)
$(EXEC): $(OBJS)
$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
romfs:
$(ROMFSINST) /bin/$(EXEC)
clean:
-rm -f $(EXEC) *.elf *.gdb *.o
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/