delorie.com is funded by banner ads.
  www.delorie.com/djgpp/v2faq/faq068.html   search  

| Previous | Next | Up | Top |

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.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright ⌐ 1998   by Eli Zaretskii     Updated Nov 1998  

Powered by Apache!

You can help support this site by visiting the advertisers that sponsor it! (only once each, though)