当前位置:网站首页>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.
边栏推荐
- 【OpenCV】-霍夫变换
- 软件测试H模型
- DVWA 通关记录 2 - 命令注入 Command Injection
- Use the scrapy to climb to save data to mysql to prevent repetition
- R语言ggplot2可视化:使用ggpubr包的ggbarplot函数可视化堆叠的柱状图(stacked bar plot)、lab.pos参数指定柱状图的数值标签的位置,lab.col参数指定数值标
- 食品安全 | 鱼肝油不是鱼油,家有宝宝的注意了
- 阿里CTO程立:阿里巴巴开源的历程、理念和实践
- 牛客网项目17节生成验证码 刷新验证码一直没反应
- 8月份的.NET Conf 活动 专注于 .NET MAUI
- LayaBox---TypeScript---JSX
猜你喜欢
随机推荐
Getting Started with SCM from Scratch (1): Summary of Background Knowledge
win10打印服务无法启动(运行时错误automation)
软件工程国考总结——选择题
转转反爬攻防战
享年94岁,图灵奖得主、计算复杂性理论先驱Juris Hartmanis逝世
Pytorch的LSTM参数解释
Long battery life or safer?Seal and dark blue SL03 comparison shopping guide
软件测试的基本理论知识(软件测试面试基础知识)
LayaBox - TypeScript - merge statement
R语言ggplot2可视化:使用ggpubr包的ggbarplot函数可视化堆叠的柱状图(stacked bar plot)、lab.pos参数指定柱状图的数值标签的位置,lab.col参数指定数值标
QT专题:组合会话框和文本编辑器
Verilog's random number system task----$random
程序员的浪漫七夕
Geoffery Hinton:深度学习的下一个大事件
Unknown content monitoring
众城优选系统开发功能
logo 图标(php图片加文字水印)
Supervised learning of Li Hang's "Statistical Learning Methods" Notes
R语言使用ggpubr包的ggtexttable函数可视化表格数据(直接绘制表格图或者在图像中添加表格数据)、设置theme主题参数自定义表格中表头内容的填充色(使用colnames.style参数)
带你认识40G单纤双向光模块-QSFP+ BiDi光模块









