Missing symbol in cling

hi,when i excute my macro, i got the same error : IncrementalExecutor:: excuteFunction:symbol ‘_z6ranlxpdi’ unresolved while linking [cling interface function]! you are probably missingbthe definition of ranlxd(double*, int).

and i also want to konw if my macro just include main function, how can i excute it ?

This is not the same error; please just start new topics, that makes it easier for us to see what’s your problem versus what else was discussed. I have moved your post to a new topic now.

You will need to load the library that contains ranlxd(double*, int), you can do that even from within your macro with ROOT_LOAD_LIBRARY(NameOfTheLibrary).

We don’t support main as macro function name because we are afraid that ROOT’s main might get invoked: to the interpreter / just-in-time compiler, interpreted and compiled code are very similar.

You can see a typical technique to deal with this here: tutorials/dataframe/df102_NanoAODDimuonAnalysis.C where main() just calls a function with the macro’s name.

sorry , I try to load the library in this method, but it faild.
Actually i 'm not sure if the library is RANLUX.

How did you try to load it? How did it fail? If you don’t know which library the symbol is in, how should I? It’s not a ROOT library - that’s all I know. You could check where the header file belongs to that you include and that provides the declaration of that function.

ok , I understand it .
Thank you !

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