Adding a class to ROOT confusion

Accessing my class through Cling in more recent ROOT versions takes an extra step that I do not remember in older versions (roughly before 6.08).

For example following closely this example, I create a library containing the class ABC, all files attached to this post.

However, executing the following lines fail:

root [0] gSystem->Load("libABC.dylib")
(int) 0
root [1] ABC a
ROOT_prompt_1:1:4: error: expected ';' after expression
ABC a
   ^
   ;
ROOT_prompt_1:1:5: error: use of undeclared identifier 'a'
ABC a
    ^

but the following lines succeed:

root [0] gROOT->ProcessLine("#include \"ABC.h\"")
(long) 0
root [1] ABC a
(ABC &) Name: ABC Title: 

Does this include statement trigger a lookup of the rootmap file that otherwise is not accessed when doing an explicit load of the library ?

-Eddy
example.tar (5 KB)

I think @axel should know the answer.

It’s broken! I’m checking…

Apologies for the long wait: I can reproduce it, working on a fix. Thanks for reporting, Eddy!

I still did not get around to debug this. I’ll let you know next week.

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