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.