<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54070>54070</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
no analyzer checkers or packages are associated with 'example.MainCallChecker' when I use libMainCallChecker.so
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
for-just-we
</td>
</tr>
</table>
<pre>
I build MainCallChecker in [SampleAnalyzer](https://github.com/llvm/llvm-project/tree/main/clang/lib/Analysis/plugins/SampleAnalyzer) out-of-tree with CMake, when I use compiled checker plugin to test test_files. clang report error:
```
error: unable to load plugin 'libMainCallChecker.so': 'libMainCallChecker.so: undefined symbol: _ZN4llvm18format_object_base4homeEv'
error: no analyzer checkers or packages are associated with 'example.MainCallChecker'
note: use -analyzer-disable-all-checks to disable all static analyzer checkers
```
The content in my Cmakelists.txt is
```
set(LLVM_LINK_COMPONENTS
Support
)
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/SampleAnalyzerPlugin.exports)
add_library(MainCallChecker MODULE
MainCallChecker.cpp
)
#set_target_properties(MainCallChecker PROPERTIES
# CXX_VISIBILITY_PRESET hidden
# )
target_include_directories(MainCallChecker
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
)
target_link_libraries(MainCallChecker
PRIVATE
clangAnalysis
clangAST
clangStaticAnalyzerCore
clangStaticAnalyzerFrontend
)
install(TARGETS MainCallChecker DESTINATION lib)
```
How could I fix this error?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytVduOozgQ_RryYiWiyY088JAmZBdNbgK61TMvyEAleNrByDaTznz9Fk7SmqSzPbPSImRD2a5z6rhczkRx9EKSNYwXZElZ5VPO_RLyV5CEVcQaPsZ0X3OYVpQff4K0hjPLcUuta2X1p5Yzx3fHdNlkvVzs8YfzH5euW0vxHXKNv1oCYL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