CLion This file does not belong to any project target, code insight

CLion This file does not belong to any project target, code insight features might not work properly.
我新建了一个名称为“haha.c”的文件
然后CLion提示上图所示的

解决方法有两个:
1.左面New新建时不要选择File或者New Scratch File
2.如果已经建好了,那么就在CMakeLists.txt文件中加入你所新建的文件名

在这里插入图片描述

然后 Reload changes 就好啦

猜你喜欢

转载自blog.csdn.net/justinzwd/article/details/85108428
今日推荐