<div dir="ltr">Hi, <div><br></div><div>I tried to install clang as in <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__clang.llvm.org_get-5Fstarted.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=TVzi7_2_-LYGUwprvICkalfQHTQ-fxcZ8fV5QKl21lw&s=POj88-A4xIPWwVohnt4-c85_XNp-97wsCPC2za5K2SE&e=">Getting started page</a>. But when I try to include the AST Matcher header file like this in a simple cpp file, </div><div><br></div><div><div><font face="monospace, monospace">#include "clang/ASTMatchers/ASTMatchers.h"</font></div><div><font face="monospace, monospace">#include "clang/ASTMatchers/ASTMatchFinder.h"</font></div></div><div><br></div><div>the compile crashed. There are error messages like this, </div><div><br></div><div>







Undefined symbols for architecture x86_64:<br><br>  "llvm::RefCountedBaseVPTR::anchor()", referenced from:<br><br>      vtable for clang::ast_matchers::internal::matcher_isPublicMatcher in removecolit-ffa5ed.o<br><br>      vtable for clang::ast_matchers::internal::matcher_isProtectedMatcher in removecolit-ffa5ed.o<br><br>      vtable for clang::ast_matchers::internal::matcher_isPrivateMatcher in removecolit-ffa5ed.o<br><br>      vtable for clang::ast_matchers::internal::matcher_isImplicitMatcher in removecolit-ffa5ed.o<br><br>      vtable for clang::ast_matchers::internal::matcher_ignoringImpCasts0Matcher in removecolit-ffa5ed.o<br><br>      vtable for clang::ast_matchers::internal::matcher_ignoringParenCasts0Matcher in removecolit-ffa5ed.o<br><br>      vtable for clang::ast_matchers::internal::matcher_ignoringParenImpCasts0Matcher in removecolit-ffa5ed.o<br><br>      ...<br><br>  "llvm::APInt::initSlowCase(unsigned int, unsigned long long, bool)", referenced from:<br><br>      llvm::APInt::APInt(unsigned int, unsigned long long, bool) in removecolit-ffa5ed.o</div><div><br></div><div>Thanks very much!<br>Best regards,<br>Han</div></div>