Node:NULL redefined,
Next:C++ exceptions,
Previous:Allegro and GRX,
Up:Compiling
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.