How to register JITEventListener with Interpreter?

Dear cling team,
I am new to cling and to understand it better I studied the example application
qling
https://github.com/cptG/qling
However, to compile it one has to comment out the line
m_interpreter.getExecutionEngine()->RegisterJITEventListener(&m_jitEventListener);
because apparently the interface of the cling interpreter has changed and the method getExecutionEngine()
does not exist anymore.
Even so qling runs but when one tries to display, for instance, a QWidget one encounters the error:
IncrementalExecutor::executeFunction: symbol 'cling_runtime_internal_throwIfInvalidPointer' unresolved while linking [cling interface function]!
My question is if there is a substitute for the aforementioned eliminated method. How else could I register a JITEventListener instance with the incremental executor / interpreter?
I am using Ubuntu 16.04 and cling version 0.5~dev

Thank you and kind regards,
Bob4

That’s likely an issue with how the binary is linked and has nothing to do with RegisterJITEventListener().

You need to link it with exporting symbols. For CMake, this might work:

set_target_properties(cling-demo
  PROPERTIES ENABLE_EXPORTS 1)

In general, see interpreter/cling/tools/demo/CMakeLists.txt for an example of how to link a binary that exports its symbols.

Cheers, Axel.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.