简体   繁体   English

Eclipse Kepler CDT“无法解析符号NULL”

[英]Eclipse Kepler CDT “Symbol NULL could not be resolved”

To write C code, I use Eclipse keppler CDT (Service Release 1, Build id: 20130919-0819) on my Mac OS X 10.8.5 system. 要编写C代码,我在Mac OS X 10.8.5系统上使用Eclipse keppler CDT(服务版本1,版本ID:20130919-0819)。

Recently, I imported a complete C framework and added all the necessary include directories to the 'Includes' tab (context menu project - properties - C/C++ General - Paths and Symbols - 'Includes' tab). 最近,我导入了一个完整的C框架,并将所有必需的包含目录添加到“包含”选项卡(上下文菜单项目-属性-C / C ++常规-路径和符号-“包含”选项卡)。

NULL is defined in the 'stddef.h' file and can be found in one of my include directories, namely '/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin12/4.2.1/include/stddef.h'. NULL在'stddef.h'文件中定义,可以在我的包含目录之一中找到,即'/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin12/4.2.1/include/stddef 。H'。

The programs in the framework build and run successful. 框架中的程序可以成功构建并运行。 I rebuilt the index after adding the include directories, but eclipse still underlines all the NULL references and shows the “Symbol NULL could not be resolved” error. 添加包含目录后,我重新构建了索引,但是eclipse仍然强调所有NULL引用并显示“无法解析符号NULL”错误。 This is annoying when searching for other errors. 搜索其他错误时很烦人。

Can somebody help me? 有人可以帮我吗?

Thank you in advance! 先感谢您!

将此头文件添加到C代码“ stddef.h”中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM