当前位置:网站首页>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.
边栏推荐
- WPF 截图控件之文字(七)「仿微信」
- 每日一题练习1-15
- 阿里CTO程立:阿里巴巴开源的历程、理念和实践
- The R language uses the rollapply function in the zoo package to apply the specified function to the time series in a rolling manner and the window moves, and set the align parameter to specify that t
- 软件测试与质量 之白盒测试
- 鸿星尔克再捐一个亿
- LayaBox---TypeScript---Iterator and generator
- sqlmap安装教程用w+r打开(sqlyog安装步骤)
- 基于列表的排队与叫号系统
- 周杰伦新歌发布,爬取《Mojito》MV弹幕,看看粉丝们都说的些啥!
猜你喜欢

matlab-day02

软件测试X模型

npm ERR! 400 Bad Request - PUT xxx - Cannot publish over previously published version “1.0.0“.

斯皮尔曼相关系数

Do you agree with this view?Most businesses are digitizing just to ease anxiety

要长续航还是更安全?海豹与深蓝SL03对比导购

关于缓存数据的探讨

js防抖函数和函数节流的应用场景

Long battery life or safer?Seal and dark blue SL03 comparison shopping guide

iNFTnews | 看见元宇宙的两面,何谓全真互联网和价值互联网?
随机推荐
LayaBox---TypeScript---Three slash instructions
yolov7 innovation point
iNFTnews | Seeing the two sides of the metaverse, what is the true Internet and the Internet of value?
软件测试H模型
SVN如何删除文件名包含空格的文件
Smoothing of time series data in R language: smoothing time series data to remove noise using the dpill function and locpoly function of the KernSmooth package
HikariCP数据库连接池,太快了!
The k-nearest neighbor method in the notes of Li Hang's "Statistical Learning Methods"
R语言ggplot2可视化:使用ggpubr包的ggbarplot函数可视化水平柱状图(条形图)、使用orientation参数设置柱状图转置为条形图
38岁女儿不恋爱没有稳定工作老母亲愁哭
要长续航还是更安全?海豹与深蓝SL03对比导购
R语言ggplot2可视化:基于aes函数中的fill参数和shape参数自定义绘制分组折线图并添加数据点(散点)、使用theme函数的legend.position函数配置图例到图像右侧
第十六章 协程
Two-dimensional array piecemeal knowledge sorting
瑞萨RZ/G2L处理器详细测评
软件测试X模型
LayaBox---TypeScript---Iterator and generator
【新版干货书】深度伪造 (DeepFakes):创造,检测和影响
Jay Chou's new song is released, crawl the "Mojito" MV barrage, and see what the fans have to say!
LayaBox---TypeScript---JSX