delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/08/09:37:36

Date: Tue, 8 Jun 1999 11:37:12 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Andrew R. Gillett" <arg AT whangomatic DOT freeserve DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: NULL redefined
In-Reply-To: <MPG.11c5d543b72ad53798ad3b@news.freeserve.net>
Message-ID: <Pine.SUN.3.91.990608113544.4197G-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 7 Jun 1999, Andrew R. Gillett wrote:

> > Upgrade to DJGPP v2.02,
> 
> I did, months ago.

May I suggest in the future to include version information when you
you reporting problems?  Given that info, people who are trying to
help you can concentrate on the real causes of your problem instead of
considering irrelevant ones.

> > > In file included from c:/tools/djgpp/lang/cxx/stl_alloc.h:57,
> > >                  from c:/tools/djgpp/lang/cxx/alloc.h:21,
> > >                  from c:/tools/djgpp/lang/cxx/std/bastring.h:39,
> > >                  from c:/tools/djgpp/lang/cxx/string:6
> > >                  from map.cpp:2:
> > > c:/tools/djgpp/include/stdlib.h:16: warning: 'NULL' redefined
> > > c:/tools/djgpp/lang/cxx/libio.h:88: warning: this is the location of the 
> > > previous definition

I don't understand how could this happen with v2.02.  The version of
stdlib.h from djdev202.zip has a line that says "#undef NULL" near its
beginning.  So no conflicts should be caused by defining NULL later in
stdlib.h.  Could you please look closer at your headers and see why
doesn't this work for you?

> > and read section 8.18 of the FAQ for explanation of the problem.
> 
> I don't see anything there relevant to this.

It might be that you have a stale version of the FAQ.  The latest FAQ
version is 2.11 (dated 13 Sep 1998), and its section 8.18 says this:

  8.18 C++ compiler says "NULL redefined"
  =======================================

  **Q*: When I compile a C++ program which includes some standard C header
  files, the compiler prints error messages about redefinition of `NULL'...*

  *A*:  This is because GCC 2.8.1 comes with C++ header files which redefine
  `NULL' in a way that conflicts with the DJGPP headers.  It's a bug in the GNU
  C++ headers, but until it is fixed, you will need to make sure you include
  the C++ headers *after* the C headers.  If that doesn't help in your case,
  you will need to hack your headers to reconcile them.

- Raw text -


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