Mail Archives: djgpp/1997/02/26/16:05:52
jth AT jth DOT ping DOT de (Jens Theisen) wrote:
>I want to use Exceptions in DJGPP. When I simpy use it, DJGPP asks me to
>use the option -fhandle-exceptions. If I do this, however, it tells me the
>error message: "undefined function terminate(void)". This function is not
>made by me, it's seems to be an internal function. I'me using version
>2.7.2.
Yes, terminate() is an internal function. It is called when you
throw an exception that is not caught or when other things inside
the exception handling mechanism went wrong (corrupt stack,...).
So, the only thing you forgot is to link the stdcxx library
(-lstdcxx). Then this error message will disappear.
If you want to use an exception class hierarchy add the compiler
option -frtti (Run-Time Type Information) and #include <typeinfo>
on top of your programs.
- Matthias -
- Raw text -