g++ 3.0.1 and ARM-ELF
João Cadamuro Junior
cadamuro@lit.cpdtt.cefetpr.br
Wed Sep 5 09:59:00 GMT 2001
Hello,
I'm trying to compile a simple program with g++ for arm.
My platform is:
host=win2k, SP2, with cygwin-1.3.2
target=arm-elf
gcc_version=3.0.1
library=newlib-1.9.0
The program is:
--------------------------------------------
class complex {
private:
int real;
int imag;
public:
// complex() { real = 0; imag=0; }
};
int main (void)
{
complex a;
return 0;
}
--------------------------------------------
Te command line is:
arm-elf-g++ -gdwarf-23 -mcpu=arm7tdmi -mlittle-endian -mapcs-32 -v -o
my_first.elf my_first.cpp
With the class constructor commented, the program compile and link
without problems. But when I add the class constructor in the code, I
get some strange errors, like...
/armtools/lib/gcc-lib/arm-elf/3.0.1/../../../../arm-elf/lib/libstdc++.a(eh_personality.o):
In function `read_encoded_value_with_base':
/src/gcc/gcc-3.0.1/gcc/unwind-pe.h:133: undefined reference to `LLSDA8'
/armtools/lib/gcc-lib/arm-elf/3.0.1/../../../../arm-elf/lib/libstdc++.a(eh_terminate.o):
In function `__cxxabiv1::__terminate(void (*)())':
/src/gcc/gcc-3.0.1/libstdc++-v3/libsupc++/eh_terminate.cc:45: undefined
reference to `LLSDA1'
/armtools/lib/gcc-lib/arm-elf/3.0.1/../../../../arm-elf/lib/libstdc++.a(eh_exception.o):/src/gcc/gcc-3.0.1/libstdc++-v3/libsupc++/eh_exception.cc:36:
undefined reference to `LLSDA7'
/armtools/lib/gcc-lib/arm-elf/3.0.1/../../../../arm-elf/lib/libstdc++.a(eh_aux_runtime.o):
In function `__cxa_bad_cast':
/src/gcc/gcc-3.0.1/libstdc++-v3/libsupc++/eh_aux_runtime.cc:42:
undefined reference to `LLSDA2'
collect2: ld returned 1 exit status
Sounds like stdc++ library is broken and is unable to find the object
with the "this" pointer.
Someone has any idea about this problem???
Thanks in advance,
João Cadamuro Junior
LIT / CPDTT / CEFET-PR
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list