THtml says "unknown class"

Attached is a tarball of a very simple ROOT application. I define a class, TuTest, and a namespace, NuName.

If I compile this, run it, and do

root [0] THtml x
root [1] x.SetProductName(“test”)
root [2] x.MakeClass(“NuName”)

I get

Info in THtml::CreateListOfClasses: Initializing - this might take a while…
Info in THtml::CreateListOfClasses: Initializing - DONE.
htmldoc/NuName.html
Info in THtml::HaveDot: Checking for Graphviz (dot)…
sh: dot: command not found

But if I then do

root [3] x.MakeClass(“TuTest”)

I get

Error in THtml::MakeClass: Unknown class ‘TuTest’!

What am I missing? TuTest certainly is defined in the application; I can do

root [4] TuTest y
root [5] y.hello()
hello world

I’m using ROOT 5.16/00 with gcc 3.4.6 .
test.tar.gz (1.5 KB)

Hi,
works for me. Note that your Makefile doesn’t create a shared library; I used g++ -shared -o libTuTest.so *.o. And before running any THtml related command I called gSystem->Load(“libTuTest.so”).
Axel.

It still does NOT work for me. I make a shared library:

g++ -shared -O -o libtest.so TuTest.o NuName.o testDict.o -L/usr/local/root/pro/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lGui -pthread -lm -ldl -rdynamic -L/usr/X11R6/lib -lXpm -lX11 -L/usr/local/root/pro/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -pthread -lm -ldl -rdynamic -L/usr/local/root/pro/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lGui -pthread -lm -ldl -rdynamic

and then run the application:

root [0] gSystem->Load(“libtest.so”);
Warning in TClassTable::Add: class TuTest already in TClassTable
root [1] THtml h
root [2] h->SetProductName(“test”)
root [3] h->MakeClass(“TuTest”)
Info in THtml::CreateListOfClasses: Initializing - this might take a while…
Info in THtml::CreateListOfClasses: Initializing - DONE.
Error in THtml::MakeClass: Unknown class ‘TuTest’!

Any new ideas on this? I’m thoroughly stumped.

Hi,

I still cannot reproduce it, even with your (quite ugly :slight_smile: link line. So I assume that this has been fixed since 5.16. Could you rename any .rootmap in your current directory? Could you try to link libtest.so only against the libraries that you actually need - which probably means none?

Cheers, Axel.

It is ugly, isn’t it? The Makefile I am using traces its ancestry back to the time of Charlemagne and has obviously picked up some odd mutations. Hence the redundant and repetitive library list.

Do you recommend hand tuning the list of libraries rather than using root-config --libs ?

There is no .rootmap file in the current directory. I linked against no libraries and tried again with the same result.

Hi,

OK, I can reproduce this with v5.16, but not with the current CVS - so it has been fixed already.

Cheers, Axel.

Thanks!