This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
exceptions without libstdc++
- To: gcc at gcc dot gnu dot org
- Subject: exceptions without libstdc++
- From: Erik Smith <ersmith at ucsd dot edu>
- Date: Mon, 12 Jun 2000 00:22:47 -0700
How do I compile a program with exceptions without linking in
libstdc++? I'm trying to reduce the size of my program by excluding the
standard library which I'm not using. I'm linking with the following options:
-nodefaultlibs -lc -lgcc
as soon as I have a throw I get the following link errors:
bench1cpp.o(.text+0x1c): undefined reference to `__eh_alloc'
bench1cpp.o(.text+0x31): undefined reference to `int type_info function'
bench1cpp.o(.text+0x38): undefined reference to `__cp_push_exception'
bench1cpp.o(.text+0x3d): undefined reference to `__throw'
bench1cpp.o(.text+0x53): undefined reference to `__throw'
bench1cpp.o(.text+0x61): undefined reference to `__start_cp_handler'
bench1cpp.o(.text+0x6c): undefined reference to `__cp_pop_exception'
bench1cpp.o(.text+0x78): undefined reference to `__throw'
bench1cpp.o(.text+0x85): undefined reference to `__cp_pop_exception'
bench1cpp.o(.text+0x93): undefined reference to `terminate(void)'
which library do I need?
erik