www.delorie.com/djgpp/v2faq/faq8_18.html   search  
Node:NULL redefined, Next:, Previous:Allegro and GRX, Up:Compiling

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.

The C header files that come with DJGPP v2.02 work around this problem, so upgrading to the latest DJGPP release should make these messages go away.

  webmaster     delorie software   privacy  
  Copyright 2001   by Eli Zaretskii     Updated Apr 2001