libstdc++ linking problem
S Sathyanarayanan
sathyas@sankhya.com
Tue Apr 30 22:35:00 GMT 2002
Hi,
I am not able to successfully link my helloworld program(test.cc) using
mips-elf-ld. I'm using mips-elf-g++ for compile.
The gcc build was successfull with newlib.
The linker is not able to link the *.o files in the archive file(stdc++)
I have tried the -lstdc++ -L<dir>, but the linker is not able to get
definitions from libstdc++. Also, i have tried with libgcc.a and libc.a
The following error is got,
mips-elf-g++ -c -EB -I/home/sathyas/yamon_appl/include -DEB -o test.o test.cc
mips-elf-g++ -c -EB -I/home/sathyas/yamon_appl/include -DEB -o start.o start.S
mips-elf-ld -T ./link.xn -o appl.elf -Map appl.map test.o start.o
test.o: In function `main':
test.cc(.text+0x18): undefined reference to `cout'
test.cc(.text+0x1c): undefined reference to `cout'
test.cc(.text+0x24): undefined reference to `ostream::operator<<(char
const *)'
make: *** [appl.elf] Error 1
test.cc -sample program
start.S -start up code for MIPS Malta board
link.xn - Linker script
Please suggest or clarify what is going wrong, I have also set the
environment variables LD_LIBRARY_PATH and GCC_EXEC_PREFIX
Thanks,
sathya
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list