www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/26/16:05:52

From: un1t AT rz DOT uni-karlsruhe DOT de (Matthias Baas)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Exceptions in DJGPP?
Date: Wed, 26 Feb 1997 17:35:08 GMT
Organization: University of Karlsruhe, Germany
Lines: 21
Message-ID: <5f1s99$3ba$1@nz12.rz.uni-karlsruhe.de>
References: <6REqf6ZjoNB AT jth DOT ping DOT de>
NNTP-Posting-Host: rzstud2.rz.uni-karlsruhe.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019