exceptions without libstdc++-v3?
Adam Megacz
gcc@lists.megacz.com
Wed Feb 27 18:59:00 GMT 2002
I'm trying to hunt down the mystery problems with exceptions in
gcj-mingw by trying C++ exceptions first.
What do I need to link in to a program to get exception support?
libstdc++-v3 doesn't build on mingw -- do you need it in order to have
exception support?
$ cat test4.cc
class foo {
public: foo() {
}
};
int main() {
try {
throw new foo();
} catch (foo* f) {
}
}
$ /usr/local/gcc/bin/i686-pc-mingw32-gcc test4.cc -o test4.exe
/tmp/ccEZ1CPd.o(.text+0x1f):test4.cc: undefined reference to `__gxx_personality_sj0'
/tmp/ccEZ1CPd.o(.text+0x5c):test4.cc: undefined reference to `operator new(unsigned)'
/tmp/ccEZ1CPd.o(.text+0xb3):test4.cc: undefined reference to `operator delete(void*)'
/tmp/ccEZ1CPd.o(.text+0xd2):test4.cc: undefined reference to `operator delete(void*)'
/tmp/ccEZ1CPd.o(.text+0xde):test4.cc: undefined reference to `__cxa_allocate_exception'
/tmp/ccEZ1CPd.o(.text+0x104):test4.cc: undefined reference to `__cxa_throw'
/tmp/ccEZ1CPd.o(.text+0x127):test4.cc: undefined reference to `__cxa_begin_catch'
/tmp/ccEZ1CPd.o(.text+0x12f):test4.cc: undefined reference to `__cxa_end_catch'
/tmp/ccEZ1CPd.o(.data$_ZTIP3foo+0x0):test4.cc: undefined reference to `vtable for __cxxabiv1::__pointer_type_info'
/tmp/ccEZ1CPd.o(.data$_ZTI3foo+0x0):test4.cc: undefined reference to `vtable for __cxxabiv1::__class_type_info'
More information about the Gcc
mailing list