Hi,
Does the current tool chain support C++ development? I tried to some tutorial code and added a dummy C++ class, it all compiled without warning but LD was complaining about some undefined references about (my guess) low level vtable code (__register... __deregister...something).
Must I manual include some library code?
TIA
using C++
How did you compiled it ? Can you copy/paste explicit compilation and error messages ?
However, I just suppose you linked using "gcc" or "ld" directly, and not using "g++", which automagically links the "libstdc++.a" library in.
However, I just suppose you linked using "gcc" or "ld" directly, and not using "g++", which automagically links the "libstdc++.a" library in.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
This is the error message:
[quote]ee-gcc -Wall -W -EL -G0 -O0 -mips3 -nostdlib -DPS2_EE -Tlinkfile -o bin/demo1.elf obj/demo1.o obj/g2.o obj/crt0.o obj/dma_asm.o obj/gs_asm.o obj/ps2_asm.o obj/Object.o -Wl,-Map,demo1.elf.map
/DOCUME~1/x/LOCALS~1/Temp/ccC7DPCp.o: In function `reg_frame':
/DOCUME~1/x/LOCALS~1/Temp/ccT8TuTM.c(.text+0x20): undefined reference to `__register_frame_info_table'
/DOCUME~1/x/LOCALS~1/Temp/ccC7DPCp.o: In function `dereg_frame':
/DOCUME~1/x/LOCALS~1/Temp/ccT8TuTM.c(.text+0x58): undefined reference to `__deregister_frame_info'
collect2: ld returned 1 exit status
make: *** [bin/demo1.elf] Error 1[/quote]
[quote]ee-gcc -Wall -W -EL -G0 -O0 -mips3 -nostdlib -DPS2_EE -Tlinkfile -o bin/demo1.elf obj/demo1.o obj/g2.o obj/crt0.o obj/dma_asm.o obj/gs_asm.o obj/ps2_asm.o obj/Object.o -Wl,-Map,demo1.elf.map
/DOCUME~1/x/LOCALS~1/Temp/ccC7DPCp.o: In function `reg_frame':
/DOCUME~1/x/LOCALS~1/Temp/ccT8TuTM.c(.text+0x20): undefined reference to `__register_frame_info_table'
/DOCUME~1/x/LOCALS~1/Temp/ccC7DPCp.o: In function `dereg_frame':
/DOCUME~1/x/LOCALS~1/Temp/ccT8TuTM.c(.text+0x58): undefined reference to `__deregister_frame_info'
collect2: ld returned 1 exit status
make: *** [bin/demo1.elf] Error 1[/quote]
Add -fno-exceptions as mharris suggested, remove -nostdlib, or use ee-g++ instead of ee-gcc as pixel suggested. Take your pick. In the future you should read up on the compiler and linker options so that you know which option does what. Manuals are on the web or installed locally with the toolchain.btyla wrote:This is the error message:
ee-gcc -Wall -W -EL -G0 -O0 -mips3 -nostdlib -DPS2_EE -Tlinkfile -o bin/demo1.elf obj/demo1.o obj/g2.o obj/crt0.o obj/dma_asm.o obj/gs_asm.o obj/ps2_asm.o obj/Object.o -Wl,-Map,demo1.elf.map
/DOCUME~1/x/LOCALS~1/Temp/ccC7DPCp.o: In function `reg_frame':
/DOCUME~1/x/LOCALS~1/Temp/ccT8TuTM.c(.text+0x20): undefined reference to `__register_frame_info_table'
/DOCUME~1/x/LOCALS~1/Temp/ccC7DPCp.o: In function `dereg_frame':
/DOCUME~1/x/LOCALS~1/Temp/ccT8TuTM.c(.text+0x58): undefined reference to `__deregister_frame_info'
collect2: ld returned 1 exit status
make: *** [bin/demo1.elf] Error 1