当前位置:网站首页>【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 重启后不再提示。
边栏推荐
- Why Metropolis–Hastings Works
- 开天aPaaS之移动手机号码空号检测【开天aPaaS大作战】
- 使用KeyStore生成证书
- Online - GCeasy GC log analysis tools
- 2022年7月31日--使用C#迈出第一步--使用C#中的数组和foreach语句来存储和循环访问数据序列
- 广域铭岛入选2022年重庆市数字经济产业发展试点示范项目名单
- DBPack SQL Tracing 功能及数据加密功能详解
- Pve delete virtual machine "for a collection"
- CTFshow,命令执行:web31
- 基于ModelArts的物体检测YOLOv3实践【玩转华为云】
猜你喜欢
小程序毕设作品之微信美食菜谱小程序毕业设计成品(2)小程序功能
How to Steal $100 Million from the Perfect Smart Contract
mysql进阶(二十二)MySQL错误之Incorrect string value中文字符输入错误问题分析
Stone Technology builds hard-core brand power and continues to expand the global market
Promise to learn several key questions (3) the Promise - state change, execution sequence and mechanism, multitasking series, abnormal penetration, interrupt the chain of Promise
Mini Program Graduation Works WeChat Food Recipes Mini Program Graduation Design Finished Products (3) Background Functions
表达式引擎在转转平台的实践
图解MySQL内连接、外连接、左连接、右连接、全连接......太多了
如何解决 chrome 浏览器标签过多无法查看到标题的情况
【钛晨报】国家统计局:7月制造业PMI为49%;玖富旗下理财产品涉嫌欺诈,涉及390亿元;国内航线机票燃油附加费8月5日0时起下调
随机推荐
使用KeyStore生成证书
小程序毕设作品之微信美食菜谱小程序毕业设计成品(4)开题报告
图解MySQL内连接、外连接、左连接、右连接、全连接......太多了
July 31, 2022 -- Take your first steps with C# -- Use C# to create readable code with conventions, spaces, and comments
NIO‘s Sword(思维,取模,推公式)
Android 安全与防护策略
Generate certificates using KeyStore
轮询和长轮询的区别
一文说明白ECDSA spec256k1 spec256r1 EdDSA ed25519千丝万缕的关系
正则表达式
数字化转型实践:世界级2B数字化营销的方法框架
如何解决 chrome 浏览器标签过多无法查看到标题的情况
Mini Program Graduation Works WeChat Food Recipes Mini Program Graduation Design Finished Products (4) Opening Report
从零开始Blazor Server(4)--登录系统
Online - GCeasy GC log analysis tools
在线GC日志分析工具——GCeasy
CTO strongly banning the use of the Calendar, that in what?
表达式引擎在转转平台的实践
Why Metropolis–Hastings Works
Glassmorphism design style