当前位置:网站首页>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.
边栏推荐
- 重磅大咖来袭!阿里云生命科学与智能计算峰会精彩内容剧透
- Application scenarios of js anti-shake function and function throttling
- You Only Hypothesize Once: 用旋转等变描述子估计变换做点云配准(已开源)
- LayaBox---TypeScript---Three slash instructions
- 开源一夏 | GO语言框架中如何快速集成日志模块
- The heavyweights are coming!Spoilers for the highlights of the Alibaba Cloud Life Science and Intelligent Computing Summit
- currentstyle 织梦_dede currentstyle属性完美解决方案
- 练习-17
- 只问耕耘,不问收获,其实收获却在耕耘中
- Linux系统卸载,安装,升级,迁移clickHouse数据库
猜你喜欢

Alibaba CTO Cheng Li: Alibaba Open Source History, Concept and Practice

Facebook's automated data analysis solution saves worry and effort in advertising

从零开始入门单片机(一):必会背景知识总结

【New Edition】DeepFakes: Creation, Detection and Influence

【OpenCV】-霍夫变换

ConvNeXt论文及实现

Application scenarios of js anti-shake function and function throttling

matlab-day02

Linux系统卸载,安装,升级,迁移clickHouse数据库

新“内卷”席卷科技圈,Google CEO 要求 174000 员工提高工作效率!
随机推荐
The k-nearest neighbor method in the notes of Li Hang's "Statistical Learning Methods"
神通数据库,批量插入数据的时候失败
38岁女儿不恋爱没有稳定工作老母亲愁哭
【OpenCV】-霍夫变换
牛客网项目17节生成验证码 刷新验证码一直没反应
从零开始Blazor Server(5)--权限验证
向量点积(Dot Product),向量叉积(Cross Product)
日元疲软令游戏机在日本变身“理财产品”:黄牛大赚
R语言ggpubr包的ggline函数可视化分组折线图、add参数为mean_se和dotplot可视化不同水平均值的折线图并为折线图添加误差线(se标准误差)和点阵图、自定义palette设置颜色
Linux system uninstall, install, upgrade, migrate clickHouse database
ConvNeXt论文及实现
qq邮箱日发5万邮件群发技术(qq邮箱怎样定时发送邮件)
Unknown content monitoring
SVN如何删除文件名包含空格的文件
Jay Chou's new song is released, crawl the "Mojito" MV barrage, and see what the fans have to say!
你好,我的新名字叫“铜锁/Tongsuo”
太帅了!我用炫酷大屏展示爬虫数据!
如何搭建威纶通触摸屏与S7-200smart之间无线PPI通信?
【云原生】快出数量级的性能是怎样炼成的?就提升了亿点点
Spearman's correlation coefficient