Windows – Eclipse CDT “Symbol NULL could not be resolved”

ceclipseeclipse-cdtmingwwindows

I just installed Eclipse CDT with MinGW.
All the environment variables are set, includes, etc. Tried running a hello world and everything seems to be fine.

I tried loading a C project that I had before in my computer, it seems to load everything fine, yet I get the following error with the NULL symbol :

Symbol 'NULL' could not be resolved

Any insights? Thanks!

Best Answer

NULL is usually defined in stddef.h. This file is also usually included with stdlib.h and stdio.h.

And, you could always do this:

#ifndef NULL
#define NULL   ((void *) 0)
#endif
Related Topic