当前位置:网站首页>[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.
边栏推荐
- Guangyu Mingdao was selected into the list of pilot demonstration projects for the development of digital economy industry in Chongqing in 2022
- 在线GC日志分析工具——GCeasy
- MFC实现交通图导航系统
- Drawing arrows of WPF screenshot control (5) "Imitation WeChat"
- 2022年中盘点 | 产品打底,科技背书,广汽集团阔步向前
- STM32 Personal Notes - Watchdog
- 从零开始Blazor Server(4)--登录系统
- 深度学习 | MATLAB实现一维卷积神经网络convolution1dLayer参数设定
- 【likeshop】回收租凭系统100%开源无加密 商城+回收+租赁
- PDMan-domestic free general database modeling tool (minimalist, beautiful)
猜你喜欢

爱可可AI前沿推介(8.1)

Promise学习(三)Promise的几个关键性问题 -- 状态改变、执行顺序与机制、多任务串联、异常穿透、中断promise链

Google Earth Engine APP——15行代码搞定一个inspector高程监测APP

这是我见过写得最烂的Controller层代码,没有之一!

招聘随想2022

PowerPC技术与市场杂谈

Promise learning (1) What is Promise?how to use?How to solve callback hell?

Golang内存分析工具gctrace和pprof实战

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

CTFshow,命令执行:web37
随机推荐
爱可可AI前沿推介(8.1)
JWT
正则表达式
Mysql index related knowledge review one
xss漏洞学习
URL.createObjectURL、URL.revokeObjectURL、Uint8Array、Blob使用详解
Android 安全与防护策略
redis6 跟着b站尚硅谷学习
CTFshow,命令执行:web37
JWT
Drawing arrows of WPF screenshot control (5) "Imitation WeChat"
各位大拿,安装Solaris 11.4操作系统,在安装数据库依赖包的时候包这个错,目前无原厂支持,也无安装盘,联网下载后报这个错,请教怎么解决?
C#/VB.NET 将PPT或PPTX转换为图像
WPF 截图控件之绘制箭头(五)「仿微信」
MacOS下postgresql(pgsql)数据库密码为什么不需要填写或可以乱填写
Push the local project to the remote repository
如何设计一个分布式 ID 发号器?
分类预测 | MATLAB实现1-DCNN一维卷积神经网络分类预测
7/31 训练日志
LeakCanary如何监听Service、Root View销毁时机?