www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/10/17:00:50

From: "DeHackEd" <Not DOT given AT out>
References: <34DF8862 DOT 2B01CF5B AT primenet DOT com>
Subject: Re: undefined reference to terminate(void);
Date: Tue, 10 Feb 1998 16:40:13 -0500
Lines: 27
Message-ID: <uJqG$0mN9GA.219@upnetnews03>
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

It means the linker could not find a function called terminate(void). This is
normally used by exception handlers (PGCC automaticly does this). There are 3
ways to fix it: 1) Link in the standard C++ library -lstdcx, 2) Disable
exception handling (-fno-exceptions to gcc) or 3) Write your own. The STDCXX
library may or may not be under the rules of the GNU licence.

Disabling exception handling is a default for me. If you are using exceptions,
it is really recommended your write your own terminate function. This way you
can do any shutting down necessary. The actual function is a call to exit();

--
"DeHackEd"

Don't email me - my address is fake

Mike McLean wrote in message <34DF8862 DOT 2B01CF5B AT primenet DOT com>...
>What does undefined reference to terminate(void); mean?  I just
>rearranged my header files.  I have one main header file that includes
>all the other headers files.  I include this header file into each file
>of my game.  Before I broke up the functions and classes (as I use C++)
>everything would compile and run just fine.  But now it gives this error
>message.  I added #ifndef _HEADERNAME_H_ and #define to all the header
>files.  I am using pgcc 1.01 if this helps.
>
>Mike.


- Raw text -


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