[cfe-dev] Linking to libclangStaticAnalyzer out-of-tree
Bhargava Shastry via cfe-dev
cfe-dev at lists.llvm.org
Wed Sep 9 07:55:34 PDT 2015
I plan to implement a stand-alone tool based off of libTooling
infrastructure that includes both AST and Analyzer Frontend actions.
Think of it as a clone of clang-check.
I intend to build this tool outside of the LLVM/Clang source tree.
Naturally, I have added libclangStaticAnalyzer* libraries to the link
section of my tool's cmake file.
Problem is, a handful of clang SA symbols are unresolved at link time.
Most of them have to do with const strings in the
clang::ento::categories namespace. Any ideas why this is happening and
how it can be fixed? FWIW, I tried to build against LLVM source tree
*and* an ubuntu installation of libclang-dev libraries. Both lead to the
following set of (sample) link-time errors.
error: undefined reference to
error: undefined reference to 'clang::ento::categories::LogicError'
error: undefined reference to 'clang::ento::categories::UnixAPI'
More information about the cfe-dev