[cfe-dev] Linking libraries to clang checker

Tarun Sethi tarunsethi01 at gmail.com
Mon May 2 16:55:29 PDT 2011


Hi,

I have written a checker in clang and some C++ code which is to be used by
the checker. I have been able to build the C++ code into a static (abc.a)
library through the clang Make system by following the structure of clang
Makefiles.
But, I get linker error when I refer something in the C++ code from the
checker, because clangStaticAnalyzerCheckers.a is not linked to my abc.a

I tried a couple of things:

- I had put my code at the examples/wpa directory level and had used the
USEDLIBS option in the StaticAnalyzer/Checkers/Makefile
- Put my code at Checkers directory level under, StaticAnalyzer thinking
that, the way clangStaticAnalyzerCore is getting linked to the
clangStaticAnalyzerCheckers, same would happen for abc.a

In both the cases, abc.a was built but linking is the problem.

Please guide me on the clang make system.

Thanks in advance.

Cheers,
Tarun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110502/bd4b388d/attachment.html>


More information about the cfe-dev mailing list