开发者社区> 问答> 正文

clang parseast,include file not found?报错

@Force武装卫队 你好,想跟你请教个问题:我用compilerinstance+parseAST解析C源码的AST时,如果源文件中有include,就报错fatal error:'stdio.h' file not found.

我想是HeaderSearchOption没有操作好,但是我不知道该怎么操作

展开
收起
爱吃鱼的程序员 2020-06-14 16:27:28 553 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    searchDir搞定没有您知道怎么设置searchDir吗?还要看你的clang是什么平台,制定-I之类的参数。lib/Frontend/InitHeaderSearch.cpp你解析源码要把include的文件也处理。

    2020-06-14 16:27:44
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
SparkR under the hood How to debug your SparkR code 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载