<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><font size="+1">I followed the libTooling tutorial at here:
        <a class="moz-txt-link-freetext" href="http://clang.llvm.org/docs/LibASTMatchersTutorial.html">http://clang.llvm.org/docs/LibASTMatchersTutorial.html</a> to write
        the loop-convert program. When I built it, I got the following
        error (I used the unofficial monorepo to build clang):<br>
      </font></p>
    <p><tt><font size="+1"><br>
        </font></tt></p>
    <p><tt><font size="+1">$ ninja loop-convert<br>
          [1/1] Linking CXX executable bin/loop-convert<br>
          FAILED: : && /usr/bin/clang++-6.0   -fPIC
          -fvisibility-inlines-hidden -Werror=date-time
          -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra
          -Wno-unused-parameter -Wwrite-strings -Wcast-qual
          -Wmissing-field-initializers -pedantic -Wno-long-long
          -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor
          -Wdelete-non-virtual-dtor -Wstring-conversion
          -fdiagnostics-color -fno-common -Woverloaded-virtual
          -Wno-nested-anon-types -g  -fuse-ld=lld-6.0
          -Wl,--color-diagnostics -Wl,-allow-shlib-undefined
tools/clang/tools/extra/loop-convert/CMakeFiles/loop-convert.dir/LoopConvert.cpp.o 
          -o bin/loop-convert  lib/libLLVMSupport.so.8svn -lpthread
          lib/libclangTooling.so.8svn lib/libclangBasic.so.8svn
          lib/libclangASTMatchers.so.8svn -Wl,-rpath,"\$ORIGIN/../lib"
          && :<br>
          /usr/bin/ld.lld-6.0: error: undefined symbol:
          clang::PCHContainerOperations::PCHContainerOperations()<br>
          >>> referenced by new_allocator.h:120
(/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/ext/new_allocator.h:120)<br>
          >>>              
tools/clang/tools/extra/loop-convert/CMakeFiles/loop-convert.dir/LoopConvert.cpp.o:(void
__gnu_cxx::new_allocator<clang::PCHContainerOperations>::construct<clang::PCHContainerOperations>(clang::PCHContainerOperations*))<br>
          <br>
          /usr/bin/ld.lld-6.0: error: undefined symbol: vtable for
          clang::SyntaxOnlyAction<br>
          >>> referenced by FrontendActions.h:158
(/home/lu/work/git-repos/llvm-mono/llvm-project/clang/include/clang/Frontend/FrontendActions.h:158)<br>
          >>>              
tools/clang/tools/extra/loop-convert/CMakeFiles/loop-convert.dir/LoopConvert.cpp.o:(clang::SyntaxOnlyAction::SyntaxOnlyAction())<br>
          <br>
          /usr/bin/ld.lld-6.0: error: undefined symbol:
          clang::FrontendAction::FrontendAction()<br>
          >>> referenced by FrontendAction.h:253
(/home/lu/work/git-repos/llvm-mono/llvm-project/clang/include/clang/Frontend/FrontendAction.h:253)<br>
          >>>              
tools/clang/tools/extra/loop-convert/CMakeFiles/loop-convert.dir/LoopConvert.cpp.o:(clang::ASTFrontendAction::ASTFrontendAction())<br>
          <br>
          /usr/bin/ld.lld-6.0: error: undefined symbol: vtable for
          clang::ASTFrontendAction<br>
          >>> referenced by FrontendAction.h:253
(/home/lu/work/git-repos/llvm-mono/llvm-project/clang/include/clang/Frontend/FrontendAction.h:253)<br>
          >>>              
tools/clang/tools/extra/loop-convert/CMakeFiles/loop-convert.dir/LoopConvert.cpp.o:(clang::ASTFrontendAction::ASTFrontendAction())<br>
          clang: error: linker command failed with exit code 1 (use -v
          to see invocation)<br>
          ninja: build stopped: subcommand failed.</font></tt></p>
    <p><tt><font size="+1"><br>
        </font></tt></p>
    <p><font size="+1">Can anyone point me to the right direction to fix
        it?</font></p>
    <p><font size="+1">Thanks.<br>
      </font></p>
    <pre class="moz-signature" cols="72">-- 
Love,
Lou

</pre>
  </body>
</html>