Jan*_*Jan 5 c++ eclipse ide gcc eclipse-cdt
我有一个使用gcc -include file.h的项目
正如gcc文档所说,这确保了file.h包含在以这种方式编译的每个文件中(意味着在每个其他文件中都有#include"file.h").
现在我已经将这个项目导入到eclipse中,并且我设置了该文件所在的包含路径,但无法弄清楚如何在eclipse项目设置中执行类似gcc -include的操作.结果是在编辑器中我有很多" 符号xy无法解决 ",但项目编译得很好.
谢谢你的帮助.
CDT GCC Built-in Compiler Settings您可以根据项目进行更改。
Project-> Properties-> C/C++ General->Preprocessor Include Paths, Macros etc. Providers选项卡。CDT GCC Built-in Compiler SettingsUse global provider shared between projectsCommand to get compiler specs:输入框中(参见下图中突出显示的文字)
您可能想点击Store entries in project settings folder