__throw link resolution problem

Jason Merrill jason@cygnus.com
Tue Apr 7 17:08:00 GMT 1998


>>>>> Todd Vierling <tv@pobox.com> writes:

> On Mon, 30 Mar 1998, Jonathan Clark wrote:
> : When linking I get the following messages :
> : 
> : /home/jc/code/i4/image/t_line.hh:129: undefined reference to `__throw'
> : /home/jc/code/golg/map_view.cc:43: undefined reference to `__rtti_si'
> : 
> : however I have never used catch or throw in my program.

> Ah, but egcs now has exceptions and RTTI turned on by default, and those...

Yup.

> : I do not link with or use any part of libstdc++.a

> ...require linking with libstdc++.

No.  All the language support code has been moved into libgcc.  Sounds
like the compiler wasn't built properly.

> No worries, though; if you don't use RTTI or exceptions, try:

> g++ -fno-rtti -fno-exceptions ...

That makes sense just to reduce the size of your code, but I'd check into
why you were getting the failures in the first place.

Jason



More information about the Gcc-bugs mailing list