Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse CDT "Symbol NULL could not be resolved"

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!

like image 885
Alex Avatar asked Sep 15 '11 15:09

Alex


1 Answers

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 
like image 86
Man Vs Code Avatar answered Sep 21 '22 15:09

Man Vs Code