www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000258

When Created: 11/25/1998 05:00:51
Against DJGPP version: 2.01
By whom: patrick.morris@uk.pwcglobal.com
Abstract: Including math.h causes the compilation to fail
Inclusion of <math.h> when moving source from Linux to MSDOS caused the following error:

C:\src>gxx -c tranp.c > error.txt
In file included from parse.y:10:
c:/djgpp/include/math.h:73: redefinition of `class exception'
c:/djgpp/lib/gcc-lib/djgpp/2.81/include/exception:20: previous definition here
c:/djgpp/lib/gcc-lib/djgpp/2.81/include/exception:20: previous declaration of `e
xception::exception(const struct exception &)' with C++ linkage
c:/djgpp/include/math.h:79: conflicts with new declaration with C linkage
c:/djgpp/lib/gcc-lib/djgpp/2.81/include/exception:20: previous declaration of `s
truct exception & exception::operator =(const struct exception &)' with C++ link
c:/djgpp/include/math.h:79: conflicts with new declaration with C linkage
c:/djgpp/include/math.h:79: confused by earlier errors, bailing out

This was not a problem for me (as I had included math.h in error in my original code as it does not use it) but I thought you might want to know.

I think this is in 2.01 but the exact dates and files I downloaded are as follows (gxx -v reports 2.8.1).

 Volume in drive C is 60062      
 Volume Serial Number is 3F3B-10DC
 Directory of C:\my documents\djgpp

DJDEV201 ZIP     1,538,295  10-06-98  3:20p djdev201.zip
BSN125B  ZIP       130,183  10-06-98  3:20p bsn125b.zip
FLX254B  ZIP       181,317  10-06-98  3:21p flx254b.zip
BNU281B  ZIP     1,896,445  10-06-98  3:21p bnu281b.zip
LGP2811B ZIP       596,811  10-06-98  3:21p lgp2811b.zip
GCC281B  ZIP     1,311,315  10-06-98  3:21p gcc281b.zip
CSDPMI4B ZIP        41,506  10-06-98  3:24p csdpmi4b.zip
MAK377B  ZIP       247,613  10-06-98  3:24p mak377b.zip
GPP281B  ZIP     1,281,235  10-06-98  3:25p gpp281b.zip

Solution added: 11/25/1998 11:00:07
By whom: broeker@physik.rwth-aachen.de
This is a known problem, fully described in the FAQ, section 8.19.

In a nutshell: get an up-to-date copy of gcc21b.zip, and
move %DJDIR%/include/math.h out of the way, so the compiler
will use it's own version, instead.

Fixed in version 2.02 on 12/01/1998 08:00:04
By whom: broeker@physik.rwth-aachen.de

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010