HI
i am loading a dynamic library(.so) in cling shell,
for some reason, the dynamic library is depended on an external variable,
so it’s obvious to report error when i .L the .so,
can i define the variable in cling shell then load the .so?
the result shows me that it’s still failed, seems the variable i defined in cling shell can not be “recognized” by the .so during the loading.
How does this relate to How to upload two .so which are depended on each other ? If it’s the same: please don’t open two topics on the same - well, topic, at the same time. If it’s different, please provide the info that Wile_E asked for. Thanks!
i tried a simple case to load one libhello.so, seems the libhello.so is loaded, while i can’t call the function defined in the libhello.so from the cling shell.
sorry i am a newbie for cling, sorry to wast your time if it’s too simple a problem.
see below -
[cling] .L libhello.so
[cling] .L hello.h
[cling] pppp();
IncrementalExecutor::executeFunction: symbol '_Z4ppppv' unresolved while linking [cling interface function]!
You are probably missing the definition of pppp()
Maybe you need to load the corresponding shared library?
[cling]
You’re building a C library (gcc, .c), but including the header into a C++ interpreter. Either compile as C++ or enclose the declarations in extern "C".