www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/24/04:05:15

Date: Sat, 22 Aug 1998 11:42:45 +0200 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: Steve Higgins <steve AT psp-digital DOT co DOT uk>
cc: "'DJGPP Mail List'" <djgpp AT delorie DOT com>
Subject: Re: Duplicate definition in two different include files.
In-Reply-To: <01BDCD1B.3FD70870@TAURUS>
Message-ID: <Pine.A32.3.91.980822113650.32212A-100000@ieva06.lanet.lv>
MIME-Version: 1.0


On Fri, 21 Aug 1998, Steve Higgins wrote:

> 
> Hi Guys, 
> 
> I was compiling some old code that compiled correctly with version 271 but fails with  version 281.
> Its easy to reproduce.
> 
> Create a c++ file which just has the following 2 lines:-
> 
> #include <new.h>
> #include <math.h>
> 
> At the dos prompt type "make testit" to get the following error messages.
> 
> make testit
> gcc     testit.cc   -o testit
> In file included from testit.cc:2:
> 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 `exception::exception(const struct exception &)' with C++ linkage
> c:/djgpp/include/math.h:79: conflicts with new declaration with C linkage

  ^^^^^^^^^^^^^^^^^^^^^^^

You are using math.h that comes with djdev201.zip. Move it out of the way
(delete, rename as You like) as gcc-2.8.1 has replacement in direcory 
c:/djgpp/lib/gcc-lib/djgpp/2.81/include

Andris

- Raw text -


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