当前位置:网站首页>【CLion】CLion 总是提示 “This file does not belong to any project target xxx” 的解决方法
【CLion】CLion 总是提示 “This file does not belong to any project target xxx” 的解决方法
2022-08-01 10:57:00 【unonoi】
参考:In IntelliJ, How Do I Fix “These Files Do Not Belong to the Project”?
在使用 CLion 写 c++ 时,文件上方提示 “This file does not belong to any project target xxx” 时,可如下操作:
- 如果是头文件:如果该头文件没有被其他文件引用,则会显示此提示,所以需要在其他地方引用该头文件。
- 如果是源文件:如果该源文件没有被添加到 CMakeLists.txt 文件中,则会显示此提示,所以需要将此文件添加到 CMakeList 中,然后删除 cmake 缓存并重新
Reload CMake Project。 - 如果是新增加到项目中的头/源文件:原因是 cmake 缓存中没有将新增文件添加到构建命令中,解决方法与 1、2 相同。
但是在我的项目中,出现了不属于上述任何情况但是文件上方仍然提示 “This file does not belong to any project target xxx” 的问题,最终研究一番后这样解决:
菜单栏 File -> Invalidate Caches… -> Invalidate and Restart.
CLion 重启后不再提示。
边栏推荐
- IntellJ IDEA如何显示换行符(line endings)
- xss漏洞学习
- Introduction to STM32 development Introduce IIC bus, read and write AT24C02 (EEPROM) (using analog timing)
- Promise learning (1) What is Promise?how to use?How to solve callback hell?
- 小程序毕设作品之微信美食菜谱小程序毕业设计成品(2)小程序功能
- gc的意义和触发条件
- 4种常见的鉴权方式及说明
- 轮询和长轮询的区别
- C#/VB.NET 将PPT或PPTX转换为图像
- Promise学习(四)异步编程的终极解决方案async + await:用同步的方式去写异步代码
猜你喜欢

图解MySQL内连接、外连接、左连接、右连接、全连接......太多了

【likeshop】回收租凭系统100%开源无加密 商城+回收+租赁

Promise learning (4) The ultimate solution for asynchronous programming async + await: write asynchronous code in a synchronous way

石头科技打造硬核品牌力 持续出海拓展全球市场

千万级乘客排队系统重构&压测方案——总结篇

什么是步进电机?40张图带你了解!

用户体验 | 如何度量用户体验 ?

小程序毕设作品之微信美食菜谱小程序毕业设计成品(3)后台功能

利用正则表达式的回溯实现绕过

Small application project works WeChat gourmet recipes applet graduation design of finished product (1) the development profile
随机推荐
各位大拿,安装Solaris 11.4操作系统,在安装数据库依赖包的时候包这个错,目前无原厂支持,也无安装盘,联网下载后报这个错,请教怎么解决?
PowerPC技术与市场杂谈
【cartographer ros】十: 延时和误差分析
分类预测 | MATLAB实现1-DCNN一维卷积神经网络分类预测
2022年7月31日--使用C#迈出第一步--使用 C# 创建具有约定、空格和注释的易读代码
新书上市 |《谁在掷骰子?》在“不确定性时代”中确定前行
C#/VB.NET 将PPT或PPTX转换为图像
博弈论(Depu)与孙子兵法(42/100)
Promise学习(一)Promise是什么?怎么用?回调地狱怎么解决?
Guangyu Mingdao was selected into the list of pilot demonstration projects for the development of digital economy industry in Chongqing in 2022
Promise to learn several key questions (3) the Promise - state change, execution sequence and mechanism, multitasking series, abnormal penetration, interrupt the chain of Promise
用户体验 | 如何度量用户体验 ?
MySQL常用语句总结
利用正则表达式的回溯实现绕过
Mini Program Graduation Works WeChat Food Recipes Mini Program Graduation Design Finished Products (3) Background Functions
C#/VB.NET convert PPT or PPTX to image
回归预测 | MATLAB实现RNN循环神经网络多输入单输出数据预测
什么是步进电机?40张图带你了解!
华硕和微星多款产品将升级英特尔Arc A380和A310显卡
回归预测 | MATLAB实现TPA-LSTM(时间注意力注意力机制长短期记忆神经网络)多输入单输出