delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/11/12:00:36

From: un1t AT rz DOT uni-karlsruhe DOT de (Matthias Baas)
Newsgroups: comp.os.msdos.djgpp
Subject: typeinfo.h and math.h conflict
Date: Tue, 11 Feb 1997 07:42:04 GMT
Organization: University of Karlsruhe, Germany
Lines: 25
Message-ID: <5dp7r4$gui$1@nz12.rz.uni-karlsruhe.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

Hi,

I want to use the exception handling mechanism with a exception
hierarchy and I therefore #include the header file <typeinfo>.
I also #include the header file <math.h> and when I compile any
program with these two header files I get the following error:

In file included from test.cc:9:
g:/include/math.h:73: redefinition of `class exception'
g:/lang/cxx/std/stdexcep.h:58: previous definition here
g:/lang/cxx/std/stdexcep.h:58: previous declaration of
`exception::exception(const struct exception &)' with C++ linkage
g:/include/math.h:79: conflicts with new declaration with C linkage
g:/lang/cxx/std/stdexcep.h:58: previous declaration of `struct
exception & exception::operator =(const struct exception &)' with C++
linkage
g:/include/math.h:79: conflicts with new declaration with C linkage
g:/include/math.h:79: confused by earlier errors, bailing out

So why is there a class named "exception" in math.h and how can I
use math.h and exception handling together in my programs?

- Matthias -


- Raw text -


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