当前位置:网站首页>MSYS2 QtCreator Clangd code analysis can not find mm_malloc.h problem remedy
MSYS2 QtCreator Clangd code analysis can not find mm_malloc.h problem remedy
2022-08-02 10:12:00 【Ding Jinben】
Recently, msys2 was upgraded in the computer room of the school. I encountered the code prompting problem of QtCreator. It is not completely solved. Because I have to go to class, a temporary remedy is adopted.
1. Phenomenon
Upgrade msys2 msys64, found that there is a problem with the parsing code of QtCreator clangd, prompting that mm_malloc.h cannot be found, similar to:
In include file : 'mm_malloc.h' file not found
Although it does not affect the compilation and debugging, it is very uncomfortable.
2. Preliminary Resolution
This error is weird.clangd is an analyzer that is supposed to automatically find header files.Open the folder and find that mm_malloc.h exists, and it is under the clang folder.

The problem should be in the configuration of clangd.When clangd analyzes the project of a third-party compiler (such as gcc), it will not associate the include of clang, which causes this problem.The correct solution is to manually specify the path for clangd, but it will not be able to find where the configuration file is placed for a while.See clangd help, it should be written in a config.Well, first use the built-in code analyzer and close the clangd option: 
3. Further resolution
After the initial solution, the analysis error is gone, but there are a lot of useful tips missing.
We create a blank mm_malloc.h in the include folder of gcc and associate it with the real mm_malloc.h.If it's Linux, the support link would be awesome.Windows, or write include it.
//mm_malloc.h in mingw64/include#include "../lib/clang/14.0.4/include/mm_malloc.h"After this setting, open the clangd option, and the original failure no longer occurs.
4. Insufficient
This method obviously won't work after upgrading clang.Because clang's include path has a version number of 14.0.4.This problem should be caused by using clang to analyze the gcc project.To solve the bell, it is necessary to be the bell person. I don't know that the development team of Qt for msys2 has noticed this problem.
边栏推荐
- Rear tube implements breadcrumb function
- 基于列表的排队与叫号系统
- 程序员的浪漫七夕
- 【新版干货书】深度伪造 (DeepFakes):创造,检测和影响
- 阿里CTO程立:阿里巴巴开源的历程、理念和实践
- R语言使用zoo包中的rollapply函数以滚动的方式、窗口移动的方式将指定函数应用于时间序列、设置align参数指定结果数据中的时间标签取自窗口中的位置(参数right指定取自窗口的最右侧)
- Rust 从入门到精通03-helloworld
- LayaBox---TypeScript---高级类型
- 第十五章 多线程
- DVWA 通关记录 2 - 命令注入 Command Injection
猜你喜欢

This article takes you to understand the commonly used models and frameworks of recommender systems

Two-dimensional array piecemeal knowledge sorting

斯皮尔曼相关系数

List-based queuing and calling system

yolov7创新点

太帅了!我用炫酷大屏展示爬虫数据!

软件测试之发现和解决bug

适配器模式适配出栈和队列及优先级队列

周鸿祎称微软抄袭 360 安全模式后发文否认;英特尔CEO基辛格回应市值被AMD超越:股价下跌是咎由自取|极客头条...

新“内卷”席卷科技圈,Google CEO 要求 174000 员工提高工作效率!
随机推荐
Rust 从入门到精通03-helloworld
软件工程国考总结——选择题
LayaBox---TypeScript---Mixins
armv7与armv8的区别(v8和w12的区别)
阿里巴巴 CTO 程立:开源是基础软件的源头!
行为型模式-模板方法模式
转转反爬攻防战
STL中list实现
牛客网项目17节生成验证码 刷新验证码一直没反应
如何搭建威纶通触摸屏与S7-200smart之间无线PPI通信?
LayaBox---TypeScript---JSX
One Summer of Open Source | How to Quickly Integrate Log Modules in GO Language Framework
qq邮箱日发5万邮件群发技术(qq邮箱怎样定时发送邮件)
R language time series data arithmetic operation: use the log function to log the time series data, and use the diff function to calculate the successive difference of the logarithmic time series data
WPF 截图控件之文字(七)「仿微信」
云原生应用平台的核心模块有哪些
DirectX修复工具增强版「建议收藏」
LayaBox---TypeScript---Iterator and generator
R语言ggpubr包的ggline函数可视化分组折线图、add参数为mean_se和dotplot可视化不同水平均值的折线图并为折线图添加误差线(se标准误差)和点阵图、自定义palette设置颜色
8月份的.NET Conf 活动 专注于 .NET MAUI