This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
exceptions without libstdc++-v3?
- From: Adam Megacz <gcc at lists dot megacz dot com>
- To: gcc at gcc dot gnu dot org
- Date: 27 Feb 2002 18:38:47 -0800
- Subject: exceptions without libstdc++-v3?
- Organization: Myself
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'