Message-ID: From: "Andris Pavenis" To: stjacy , Eli Zaretskii Date: Mon, 13 Jul 1998 17:39:09 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: a strange problem about djgpp v2.1 CC: djgpp AT delorie DOT com References: <01bcea00$1bf6f400$ad0620a3 AT nydia-3> In-reply-to: Precedence: bulk Date sent: Mon, 13 Jul 1998 13:13:34 +0300 (IDT) From: Eli Zaretskii To: stjacy Copies to: djgpp AT delorie DOT com Subject: Re: a strange problem about djgpp v2.1 > > On 12 Jul 1998, stjacy wrote: > > > #include > > #include > > > > int main() > > {} > > > > The compiler complaind that there are name conflict about "exception"! > > This is a known problem with math.h from DJGPP v2.01: one of the > functions there uses struct exception, and `exception' is a reserved word > in the latest versions of C++. v2.02 corrects that. > > If you can't avoid using , I suggest the following workaround > (warning: untested code follows): > > #define exception __exception > #include > #undef exception > #include > > int main () > {} > > The problem is that gcc-2.8.1 takes math.h from $DJDIR/include while correct version is in $DJDIR/lib/gcc-lib/djgpp/2.81/include. This is so because it is no more need to keep $DJDIR/include in include files search path as gcc-2.8.1 knows the default search directories. I suggest take a look (and perhaps use) a version of DJGPP.ENV which is included with gcc281b.zip (in directory /gnu/gcc-2.81) Andris