文件页面头部This file does not belong to any project target, code insight features might not work properly
先看整张图:
看几个点:
1、最直观的slamBase.h头文件的文本编辑页面上方有: This file does not belong to any project target, code insight features might not work properly
警告提示。
2、左边目录树中,include文件夹和其中的头文件slamBase.h文件都是灰色的。
3、而src文件夹和其中的文件都是彩色的。
原因可能就是没有关联include文件夹。
右键点击include文件夹,选择Mark Directotry as,然后选择Project Sources and Headers:
然后报警就没有了,include文件夹和slamBase.h文件也被点亮了: