Eclipse CDT “Symbol NULL could not be resolved”

后端 未结 13 1839
北荒
北荒 2020-12-06 04:32

I just installed Eclipse CDT with MinGW. All the environment variables are set, includes, etc. Tried running a hello world and everyth

13条回答
  •  星月不相逢
    2020-12-06 04:39

    This problem is still coming up in 2019... there are many different causes/solutions.

    I was getting unresolved symbols in the editor for NULL and everything in stdio.h (stderr, printf etc.) but compile worked fine. Nothing helped until I went in project properties and deleted a bunch of unnecessary C/C++ include paths. After that reindexing fixed the problem.

    In another case I had an undefined symbol for a class name that was involved in some conditional preprocessor macro trickery. Adding the header file which defines the macro to "Index all variants of specific headers" in C/C++ indexer options (after checking "Enable project specific settings) fixed it.

    This shows the the eclipse CDT indexer can get confused easily.

提交回复
热议问题