Clang 叮当声教程编译错误

Clang 叮当声教程编译错误,clang,tokenize,abstract-syntax-tree,llvm-clang,libclang,Clang,Tokenize,Abstract Syntax Tree,Llvm Clang,Libclang,就像每一个新人一样,我正在尝试使用这里提供的教程,用叮当声构建一些东西: 我可以使用以下命令生成第一个和第二个教程: export CLANG_LIBS="-lclangTooling -lclangFrontendTool -lclangFrontend -lclangDriver -lclangSerialization -lclangCodeGen -lclangParse -lclangSema -lclangStaticAnalyzerFrontend -lclangStaticAn

就像每一个新人一样,我正在尝试使用这里提供的教程,用叮当声构建一些东西:

我可以使用以下命令生成第一个和第二个教程:

export CLANG_LIBS="-lclangTooling -lclangFrontendTool -lclangFrontend -lclangDriver -lclangSerialization -lclangCodeGen -lclangParse -lclangSema -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangAnalysis -lclangARCMigrate -lclangRewrite -lclangRewriteFrontend -lclangEdit -lclangAST -lclangLex -lclangBasic -lclang" 出口关税=“-lclangTooling-lclangFrontendTool-lclangFrontend-lclangDriver-lclangSerialization-lclangCodeGen-lclangParse-lclangSema-lclangStaticAnalyzerFrontend-lclangStaticAnalyzerCheckers-lclangStaticAnalyzerCore-lclangAnalysis-lclangARCMigrate-lclangRewrite-LCLangRewrited-lclangEdit-lclangAST-lclangLex-lclangBasic-lclang” 并使用以下工具进行编译:

g++ `llvm-config --cxxflags --ldflags ` tool.cpp $CLANG_LIBS `llvm-config --libs --system-libs` -o tool g++`llvm config--cxflags--ldflags`tool.cpp$CLANG_LIBS`llvm config--LIBS--system LIBS`-o工具 这很有效!当我使用相同的命令进入教程3时,我会出现以下错误:

tutorial3.cpp: In function ‘int main()’: tutorial3.cpp:85:24: error: invalid initialization of reference of type ‘const clang::PCHContainerReader&’ from expression of type ‘clang::FrontendOptions’ frontendOptions); ^ In file included from tutorial3.cpp:18:0: /usr/local/include/clang/Frontend/Utils.h:66:6: note: in passing argument 3 of ‘void clang::InitializePreprocessor(clang::Preprocessor&, const clang::PreprocessorOptions&, const clang::PCHContainerReader&, const clang::FrontendOptions&)’ void InitializePreprocessor(Preprocessor &PP, const PreprocessorOptions &PPOpts, tutorial3.cpp:在函数“int main()”中:tutorial3.cpp:85:24:错误: 类型的引用的初始化无效 “const clang::PCHContainerReader&”来自类型的表达式 “叮当声::前声” 正面; ^在tutorial3.cpp:18:0:/usr/local/include/clang/Frontend/Utils.h:66:6中包含的文件中:注意:传递“void”的参数3 clang::InitializeProcessor(clang::预处理器&,常量 叮当声::预处理器&,常量叮当声::PCHContainerReader&,常量 clang::FrontInOptions&)的void InitializeProcessor(预处理器 &PP、常量预处理器和PPOpts,
有人能帮我吗?此外,是否有已知的clang用户群?我尝试了google groups,但没有找到任何!谢谢

请将错误消息作为文本包含在问题中,而不是作为屏幕截图。请将错误消息作为文本包含在问题中,而不是作为屏幕截图。