当前位置:网站首页>[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.
边栏推荐
- How to Steal $100 Million from the Perfect Smart Contract
- Dapr 与 NestJs ,实战编写一个 Pub & Sub 装饰器
- 深度学习 | MATLAB实现GRU门控循环单元gruLayer参数设定
- Promise learning (4) The ultimate solution for asynchronous programming async + await: write asynchronous code in a synchronous way
- leetcode/子矩阵元素和
- 小程序毕设作品之微信美食菜谱小程序毕业设计成品(3)后台功能
- 解决vscode输入! 无法快捷生成骨架(新版vscode快速生成骨架的三种方法)
- 如何设计一个分布式 ID 发号器?
- OpenHarmony高校技术俱乐部计划发布
- 将本地项目推送到远程仓库
猜你喜欢

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

Promise学习(一)Promise是什么?怎么用?回调地狱怎么解决?

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

【随心笔记】假期快过去了,都干了点什么

如何在IntellJ IDEA中批量修改文件换行符

OpenHarmony高校技术俱乐部计划发布

How to Steal $100 Million from the Perfect Smart Contract
retired paddling

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

Flutter Widget 如何启用和屏蔽点击事件
随机推荐
Google Earth Engine APP——15行代码搞定一个inspector高程监测APP
The meaning and trigger conditions of gc
Drawing arrows of WPF screenshot control (5) "Imitation WeChat"
2022年中盘点 | 产品打底,科技背书,广汽集团阔步向前
WPF 截图控件之绘制箭头(五)「仿微信」
从零开始Blazor Server(4)--登录系统
[Cloud Residency Co-Creation] Huawei Cloud Global Scheduling Technology and Practice of Distributed Technology
跨域网络资源文件下载
STM32 Personal Notes - Watchdog
.NET深入解析LINQ框架(三:LINQ优雅的前奏)
小程序毕设作品之微信美食菜谱小程序毕业设计成品(1)开发概要
MacOS下postgresql(pgsql)数据库密码为什么不需要填写或可以乱填写
xss-labs靶场挑战
slice、splice、split傻傻分不清
Hot review last week (7.25 7.31)
每日一题:连续子数组的最大和(动态规划)
CTFshow,命令执行:web37
DBPack SQL Tracing 功能及数据加密功能详解
我是如何保护 70000 ETH 并赢得 600 万漏洞赏金的
URL.createObjectURL、URL.revokeObjectURL、Uint8Array、Blob使用详解