Embedding cling in an c++ application

Hi all,

For a school project we have to embed cling into an c++ application. The problem is that we can find almost no documentation on how to do this.

Are there any examples available on this topic or could anyone maby give us a simple example?

Thanks in advance.

With friendly greetings,

PS: We got cling to compile and the commandline interface works.

We found out that you should be able to include cling/Interpreter/Interpreter.h to acces the interpreter. However when we do this, we get the following error:

/tmp/ccFoyDHI.o: In function `cling::internal::ForceSymbolsAsUsed::ForceSymbolsAsUsed()': testlib.cpp:(.text._ZN5cling8internal18ForceSymbolsAsUsedC2Ev[_ZN5cling8internal18ForceSymbolsAsUsedC5Ev]+0x22): undefined reference to `cling::internal::symbol_requester()' collect2: error: ld returned 1 exit status
Does anyone know how to solve this or is it a known bug?


How did you link against the cling libraries? It looks like you might have missed some part of the library.