cling
cling copied to clipboard
symbol get lost when linking
Hello,
I am trying to compile a shared library which uses cling to compile some dynamic functions.
If i make it an executable everything works fine. But if i make it a shared library which i link with another executable, i get the following error when using cling to compile a function:
IncrementalExecutor::executeFunction: symbol 'cling_runtime_internal_throwIfInvalidPointer' unresolved while linking [cling interface function]!
I played around with different combinations of
-Wl,--whole-archive libcling -Wl,--no-whole-archive
==> which works for the executable
and
-Wl,--whole-archive clingInterpreter -Wl,--no-whole-archive
==> which shows the symbol in the shared library
00000000007a7850 T cling_runtime_internal_throwIfInvalidPointer
but within the executable using this shared library the error still exists.
I'm using cmake and catch for testing.
Does anyone has an idea or final hint how to keep the symbol visible ?