当前位置:网站首页>[CLion] CLion always prompts "This file does not belong to any project target xxx" solution
[CLion] CLion always prompts "This file does not belong to any project target xxx" solution
2022-08-01 11:03:00 【unonoi】
Reference: In IntelliJ, How Do I Fix “These Files Do Not Belong to the Project”?
When using CLion to write c++, when the top of the file prompts "This file does not belong to any project target xxx", you can do the following:
- If it is a header file: If the header file is not referenced by other files, this prompt will be displayed, so the header file needs to be referenced elsewhere.
- If it is a source file: If the source file is not added to the CMakeLists.txt file, this prompt will be displayed, so you need to add this file to the CMakeList, then delete the cmake cache and re-
Reload CMake Project
. - If it is a header/source file newly added to the project: The reason is that the new file is not added to the build command in the cmake cache, and the solution is the same as 1 and 2.
But in my project, there is a problem that does not belong to any of the above, but the above file still prompts "This file does not belong to any project target xxx". After some research, I solved it like this:
Menu bar File -> Invalidate Caches… -> Invalidate and Restart.
CLion no longer prompts after restarting.
边栏推荐
猜你喜欢
随机推荐
Dapr 与 NestJs ,实战编写一个 Pub & Sub 装饰器
Jenkins安装插件遇到的问题
各位大拿,安装Solaris 11.4操作系统,在安装数据库依赖包的时候包这个错,目前无原厂支持,也无安装盘,联网下载后报这个错,请教怎么解决?
2022年7月31日--使用C#迈出第一步--使用C#中的数组和foreach语句来存储和循环访问数据序列
重庆市大力实施智能建造,推动建筑业数字化转型,助力“建造强市”
监视网络连接的ss命令
Mini Program Graduation Works WeChat Food Recipes Mini Program Graduation Design Finished Products (2) Mini Program Functions
NIO‘s Sword(思维,取模,推公式)
Golang内存分析工具gctrace和pprof实战
Hot review last week (7.25 7.31)
新书上市 |《谁在掷骰子?》在“不确定性时代”中确定前行
Glassmorphism design style
Qt supports HEIC/HEIF format images
跨域网络资源文件下载
Qt 支持HEIC/HEIF格式图片
slice、splice、split傻傻分不清
机器学习 | MATLAB实现支持向量机回归RegressionSVM参数设定
【钛晨报】国家统计局:7月制造业PMI为49%;玖富旗下理财产品涉嫌欺诈,涉及390亿元;国内航线机票燃油附加费8月5日0时起下调
博弈论(Depu)与孙子兵法(42/100)
每日一题:连续子数组的最大和(动态规划)