Hello.
Skimo, unfortunately, it's not working for me. I got away from the previous errors, but now I get linker errors:
libtool: link: g++ -std=c++11 -I/usr/lib/llvm-18/include -std=c++17 -fno-exceptions -funwind-tables -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -O2 -o extract_interface extract_interface-generator.o extract_interface-python.o extract_interface-cpp.o extract_interface-cpp_conversion.o extract_interface-plain_cpp.o extract_interface-template_cpp.o extract_interface-extract_interface.o -L/usr/lib/llvm-18/lib -lclangFrontend -lclangSerialization -lclangParse -lclangSema -lclangEdit -lclangAnalysis -lclangAST -lclangLex -lclangDriver -lclangBasic -lclangSupport -lLLVM-18 -Wl,-rpath -Wl,/usr/lib/llvm-18/lib
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangFrontend.a(CompilerInstance.cpp.o): in function `clang::CompilerInstance::createSema(clang::TranslationUnitKind, clang::CodeCompleteConsumer*)':
(.text._ZN5clang16CompilerInstance10createSemaENS_19TranslationUnitKindEPNS_20CodeCompleteConsumerE+0xef): undefined reference to `clang::api_notes::APINotesManager::loadCurrentModuleAPINotes(clang::Module*, bool, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >)'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangSema.a(Sema.cpp.o): in function `clang::Sema::Sema(clang::Preprocessor&, clang::ASTContext&, clang::ASTConsumer&, clang::TranslationUnitKind, clang::CodeCompleteConsumer*)':
(.text._ZN5clang4SemaC2ERNS_12PreprocessorERNS_10ASTContextERNS_11ASTConsumerENS_19TranslationUnitKindEPNS_20CodeCompleteConsumerE+0x19d): undefined reference to `clang::api_notes::APINotesManager::APINotesManager(clang::SourceManager&, clang::LangOptions const&)'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangSema.a(Sema.cpp.o): in function `clang::Sema::~Sema()':
(.text._ZN5clang4SemaD2Ev+0x15ae): undefined reference to `clang::api_notes::APINotesManager::~APINotesManager()'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o): in function `clang::ast_matchers::internal::matcher_ignoringImpCasts0Matcher::matches(clang::Expr const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const':
(.text._ZNK5clang12ast_matchers8internal32matcher_ignoringImpCasts0Matcher7matchesERKNS_4ExprEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE[_ZNK5clang12ast_matchers8internal32matcher_ignoringImpCasts0Matcher7matchesERKNS_4ExprEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE]+0x55): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::matches(clang::DynTypedNode const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o): in function `clang::ast_matchers::internal::matcher_ignoringParenImpCasts0Matcher::matches(clang::Expr const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const':
(.text._ZNK5clang12ast_matchers8internal37matcher_ignoringParenImpCasts0Matcher7matchesERKNS_4ExprEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE[_ZNK5clang12ast_matchers8internal37matcher_ignoringParenImpCasts0Matcher7matchesERKNS_4ExprEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE]+0x55): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::matches(clang::DynTypedNode const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o): in function `clang::ast_matchers::internal::matcher_ignoringParens1Matcher::matches(clang::Expr const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const':
(.text._ZNK5clang12ast_matchers8internal30matcher_ignoringParens1Matcher7matchesERKNS_4ExprEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE[_ZNK5clang12ast_matchers8internal30matcher_ignoringParens1Matcher7matchesERKNS_4ExprEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE]+0x55): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::matches(clang::DynTypedNode const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o): in function `clang::ast_matchers::internal::matcher_hasCanonicalType0Matcher::matches(clang::QualType const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const':
(.text._ZNK5clang12ast_matchers8internal32matcher_hasCanonicalType0Matcher7matchesERKNS_8QualTypeEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE[_ZNK5clang12ast_matchers8internal32matcher_hasCanonicalType0Matcher7matchesERKNS_8QualTypeEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE]+0x48): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::matches(clang::DynTypedNode const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o): in function `clang::ast_matchers::internal::VariadicOperatorMatcher<clang::ast_matchers::internal::PolymorphicMatcher<clang::ast_matchers::internal::matcher_hasType0Matcher, void (clang::ast_matchers::internal::TypeList<clang::Expr, clang::FriendDecl, clang::TypedefNameDecl, clang::ValueDecl, clang::CXXBaseSpecifier>), clang::ast_matchers::internal::Matcher<clang::QualType> >, clang::ast_matchers::internal::PolymorphicMatcher<clang::ast_matchers::internal::matcher_hasType0Matcher, void (clang::ast_matchers::internal::TypeList<clang::Expr, clang::FriendDecl, clang::TypedefNameDecl, clang::ValueDecl, clang::CXXBaseSpecifier>), clang::ast_matchers::internal::Matcher<clang::QualType> > >::operator clang::ast_matchers::internal::Matcher<clang::Expr><clang::Expr>() &&':
(.text._ZNO5clang12ast_matchers8internal23VariadicOperatorMatcherIJNS1_18PolymorphicMatcherINS1_23matcher_hasType0MatcherEFvNS1_8TypeListIJNS_4ExprENS_10FriendDeclENS_15TypedefNameDeclENS_9ValueDeclENS_16CXXBaseSpecifierEEEEEJNS1_7MatcherINS_8QualTypeEEEEEESG_EEcvNSD_IT_EEIS6_EEv[_ZNO5clang12ast_matchers8internal23VariadicOperatorMatcherIJNS1_18PolymorphicMatcherINS1_23matcher_hasType0MatcherEFvNS1_8TypeListIJNS_4ExprENS_10FriendDeclENS_15TypedefNameDeclENS_9ValueDeclENS_16CXXBaseSpecifierEEEEEJNS1_7MatcherINS_8QualTypeEEEEEESG_EEcvNSD_IT_EEIS6_EEv]+0x45): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::constructVariadic(clang::ast_matchers::internal::DynTypedMatcher::VariadicOperator, clang::ASTNodeKind, std::vector<clang::ast_matchers::internal::DynTypedMatcher, std::allocator<clang::ast_matchers::internal::DynTypedMatcher> >)'
/usr/bin/ld: (.text._ZNO5clang12ast_matchers8internal23VariadicOperatorMatcherIJNS1_18PolymorphicMatcherINS1_23matcher_hasType0MatcherEFvNS1_8TypeListIJNS_4ExprENS_10FriendDeclENS_15TypedefNameDeclENS_9ValueDeclENS_16CXXBaseSpecifierEEEEEJNS1_7MatcherINS_8QualTypeEEEEEESG_EEcvNSD_IT_EEIS6_EEv[_ZNO5clang12ast_matchers8internal23VariadicOperatorMatcherIJNS1_18PolymorphicMatcherINS1_23matcher_hasType0MatcherEFvNS1_8TypeListIJNS_4ExprENS_10FriendDeclENS_15TypedefNameDeclENS_9ValueDeclENS_16CXXBaseSpecifierEEEEEJNS1_7MatcherINS_8QualTypeEEEEEESG_EEcvNSD_IT_EEIS6_EEv]+0x55): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::dynCastTo(clang::ASTNodeKind) const'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o): in function `clang::ast_matchers::internal::matcher_to0Matcher::matches(clang::DeclRefExpr const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const':
(.text._ZNK5clang12ast_matchers8internal18matcher_to0Matcher7matchesERKNS_11DeclRefExprEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE[_ZNK5clang12ast_matchers8internal18matcher_to0Matcher7matchesERKNS_11DeclRefExprEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE]+0x53): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::matches(clang::DynTypedNode const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o): in function `clang::ast_matchers::internal::matcher_hasSingleDecl0Matcher::matches(clang::DeclStmt const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const':
(.text._ZNK5clang12ast_matchers8internal29matcher_hasSingleDecl0Matcher7matchesERKNS_8DeclStmtEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE[_ZNK5clang12ast_matchers8internal29matcher_hasSingleDecl0Matcher7matchesERKNS_8DeclStmtEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE]+0x53): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::matches(clang::DynTypedNode const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o): in function `clang::ast_matchers::internal::matcher_hasInitializer0Matcher::matches(clang::VarDecl const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const':
(.text._ZNK5clang12ast_matchers8internal30matcher_hasInitializer0Matcher7matchesERKNS_7VarDeclEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE[_ZNK5clang12ast_matchers8internal30matcher_hasInitializer0Matcher7matchesERKNS_7VarDeclEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE]+0x61): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::matches(clang::DynTypedNode const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o): in function `clang::ast_matchers::internal::matcher_hasThen0Matcher::matches(clang::IfStmt const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const':
(.text._ZNK5clang12ast_matchers8internal23matcher_hasThen0Matcher7matchesERKNS_6IfStmtEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE[_ZNK5clang12ast_matchers8internal23matcher_hasThen0Matcher7matchesERKNS_6IfStmtEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE]+0x73): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::matches(clang::DynTypedNode const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o): in function `clang::ast_matchers::internal::matcher_hasElse0Matcher::matches(clang::IfStmt const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const':
(.text._ZNK5clang12ast_matchers8internal23matcher_hasElse0Matcher7matchesERKNS_6IfStmtEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE[_ZNK5clang12ast_matchers8internal23matcher_hasElse0Matcher7matchesERKNS_6IfStmtEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE]+0x76): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::matches(clang::DynTypedNode const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const'
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o):(.text._ZNK5clang12ast_matchers8internal24matcher_hasIndex0Matcher7matchesERKNS_18ArraySubscriptExprEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE[_ZNK5clang12ast_matchers8internal24matcher_hasIndex0Matcher7matchesERKNS_18ArraySubscriptExprEPNS1_14ASTMatchFinderEPNS1_21BoundNodesTreeBuilderE]+0xf4): more undefined references to `clang::ast_matchers::internal::DynTypedMatcher::matches(clang::DynTypedNode const&, clang::ast_matchers::internal::ASTMatchFinder*, clang::ast_matchers::internal::BoundNodesTreeBuilder*) const' follow
/usr/bin/ld: /usr/lib/llvm-18/lib/libclangAnalysis.a(UnsafeBufferUsage.cpp.o): in function `findGadgets(clang::Decl const*, clang::UnsafeBufferUsageHandler const&, bool)':
(.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x48): undefined reference to `clang::ast_matchers::MatchFinder::MatchFinder(clang::ast_matchers::MatchFinder::MatchFinderOptions)'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x253): undefined reference to `clang::ast_matchers::unaryOperator'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x2c7): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::tryBind(llvm::StringRef) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x2db): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::dynCastTo(clang::ASTNodeKind) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x46e): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::tryBind(llvm::StringRef) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x482): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::dynCastTo(clang::ASTNodeKind) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x508): undefined reference to `clang::ast_matchers::allOf'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x694): undefined reference to `clang::ast_matchers::unaryOperator'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x708): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::tryBind(llvm::StringRef) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x71c): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::dynCastTo(clang::ASTNodeKind) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x8b4): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::tryBind(llvm::StringRef) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x8c8): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::dynCastTo(clang::ASTNodeKind) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x943): undefined reference to `clang::ast_matchers::allOf'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x997): undefined reference to `clang::ast_matchers::anyOf'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0xb29): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::dynCastTo(clang::ASTNodeKind) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0xb93): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::trueMatcher(clang::ASTNodeKind)'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0xba7): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::dynCastTo(clang::ASTNodeKind) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0xc20): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::dynCastTo(clang::ASTNodeKind) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0xc82): undefined reference to `clang::ast_matchers::anyOf'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0xd2b): undefined reference to `clang::ast_matchers::unless'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0xd6a): undefined reference to `clang::ast_matchers::arraySubscriptExpr'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0xde5): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::tryBind(llvm::StringRef) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0xdf9): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::dynCastTo(clang::ASTNodeKind) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x100f): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::tryBind(llvm::StringRef) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x1023): undefined reference to `clang::ast_matchers::internal::DynTypedMatcher::dynCastTo(clang::ASTNodeKind) const'
/usr/bin/ld: (.text._ZL11findGadgetsPKN5clang4DeclERKNS_24UnsafeBufferUsageHandlerEb+0x109e): undefined reference to `clang::ast_matchers::allOf'
And so on. Can somebody help me here?
Thank you,
Alex