当前位置:网站首页>[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 find out hidden computer software (how to clean up the computer software hidden)
- slice、splice、split傻傻分不清
- Google Earth Engine——给影像添加一个属性对于单景的时间序列并返回影像
- Stone Technology builds hard-core brand power and continues to expand the global market
- MFC implementation road map navigation system
- Why Metropolis–Hastings Works
- July 31, 2022 -- Take your first steps with C# -- Use arrays and foreach statements in C# to store and iterate through sequences of data
- C#/VB.NET convert PPT or PPTX to image
- CTFshow,命令执行:web32
- 万字解析:vector类
猜你喜欢

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

Endorsed in 2022 years inventory | product base, science and technology, guangzhou automobile group striding forward

Mysql index related knowledge review one

Mini Program Graduation Works WeChat Food Recipes Mini Program Graduation Design Finished Products (2) Mini Program Functions

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

Stone Technology builds hard-core brand power and continues to expand the global market

Android Security and Protection Policy

2022年中盘点 | 产品打底,科技背书,广汽集团阔步向前

.NET analyzes the LINQ framework in depth (three: the elegant prelude of LINQ)

Promise学习(四)异步编程的终极解决方案async + await:用同步的方式去写异步代码
随机推荐
【cartographer ros】10: Delay and error analysis
Android 安全与防护策略
The meaning and trigger conditions of gc
Why Metropolis–Hastings Works
各位大拿,安装Solaris 11.4操作系统,在安装数据库依赖包的时候包这个错,目前无原厂支持,也无安装盘,联网下载后报这个错,请教怎么解决?
cisco交换机基本配置命令(华为交换机保存命令是什么)
Introduction to STM32 development Introduce IIC bus, read and write AT24C02 (EEPROM) (using analog timing)
浏览器快捷键大全
[Nodejs] node的fs模块
Promise学习(二)一篇文章带你快速了解Promise中的常用API
从零开始Blazor Server(4)--登录系统
利用正则表达式的回溯实现绕过
Endorsed in 2022 years inventory | product base, science and technology, guangzhou automobile group striding forward
xss-labs靶场挑战
CTFshow,命令执行:web31
语音聊天app源码——语音聊天派对
JWT
redis6 跟着b站尚硅谷学习
CTFshow,命令执行:web33
将本地项目推送到远程仓库