Trouble with THTML

I see that another issue with THtml remains unresolved so perhaps mine is the same:

I use ROOT 5.22 (the binary version) wih Windows Vista and VC++ 2005.

I load my dll and make sure that ‘myClass’ is known to ROOT and its methods work as intended. ALso,

myClass::Class()->GetDeclFileName()

returns “myClass.hpp”

In attempting to create html documentation I do:

THtml html
html.SetInputDir(“C:/Users/MK/Desktop/mySourceCode”)
html.SetOutputDir(“C:/Users/MK/Desktop/Html”)

If I try

html.MakeClass(“myClass”)

or

html.MakeIndex()

or

html.MakeAll()

I get many warnings like:

“Warning in THtml::CreateListOfClasses: Cannot determine declaration file name for…”

for classes that aren’t mine, and the error messages like:

Info in THtml::CreateListOfClasses: Initializing - DONE.
Error in THtml::MakeClass: Unknown class ‘myClass’!

for ‘myClass’, which otherwise work in ROOT.

In the output directory I specified I get a bunch of files generated with no class content.

Am I doing something wrong, or is this a bug?

Thanks

Axel will process your mail once he will be back.

Rene

Hi,

thanks for the report! This is now fixed in the trunk.

Cheers, Axel.

Hi,

Still no luck generating html documentation with v5.24.00 and VC++ 2005 on Vista.

When I load a dll into CINT I get the following:

root [0] gSystem->Load(“C:/temp/MyClass.dll”)
Warning in TClassTable::Add: class MyClass already in TClassTable

The warning appears right from the first time I load the dll.
The methods of MyClass seem to be working fine, but if I try to generate html documentation with THTML I get all kinds of warnings about header files missing, ending with

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

I also get the following:

root [1] MyClass::Class()->GetDeclFileName()
Warning in TClassTable::Add: class MyClass already in TClassTable
(const char* 0x355cea4)“MyClass.hpp”

I suspect the problem is here:

root [10] MyClass::Class()->GetImplFileName()
(const char* 0x102fc502)""

The method GetImplFileName returns the same value “” for all my loaded classes.

Thanks for any help.

Hi,

there is something really weird going on with your DLL, not connected to THtml. Do you have two dictionaries for the same class in it? Can you send me your MyClass.dll? (Axel.Naumann@cern.ch)

Cheers, Axel.

Hi,

given the test cases you sent I cannot reproduce this. My assumption is that you are mixing debug / release. ROOT and your DLL need to be built with the same /MDd (debug) or /MD (release) flags, and they should use the same version of MSVC or you might get into trouble with STL.

Cheers, Axel.

Hi,

I downloaded the ROOT binary version ftp://root.cern.ch/root/root_v5.24.00.win32.vc90.msi

which apparently has been compiled with VC++9 but is advertized as compatible with VC++8

I use VC++8 for my own code.

If I compile in Release mode I’m having the problems I described.
Does this mean that the above ROOT binary version is not compatible with VC++8? Is there one I can download that is, or do I need to build ROOT from source?

Thanks, Marios

OK, I looked a bit more into this:

-First, I re-built ROOT 5.24 with VC++8 from the source code at
ftp://root.cern.ch/root/root_v5.24.00.source.tar.gz
using
root-builder.sourceforge.net/
in “Release mode with debug notes”

-I built the attached project “test2” using VC++8 in Release mode. I also removed references to STL libraries and only use ROOT classes to simplify debugging.

-When I load the dll into ROOT I no longer get warnings about the class being already loaded, the class seems to be functioning properly, and ROOT knows the location of the declaration and implementation files:

root [0] gSystem->Load(“C:/Users/MK/Desktop/test2/test.dll”)
(int)0
root [1] test::Class()->GetDeclFileName()
(const char* 0x2434300)“test.hpp”
root [2] test::Class()->GetImplFileName()
(const char* 0x2434d3c)".\test.cpp"

So this already fixes some problems reported earlier that seem to be due to the incompatibility of the ROOT binary built with VC++9 and my dll built with VC++8.

-But I still can’t get THTML to work. What do the errors below mean?

root [3] test t(“this is a test”)
root [4] cout << t.GetString() << endl;
this is a test
root [5] test::Class()->GetDeclFileName()
(const char* 0x2434300)“test.hpp”
root [6] test::Class()->GetImplFileName()
(const char* 0x2434d3c)".\test.cpp"
root [7] THtml html
root [8] html.SetInputDir(“C:/Users/MK/Desktop/test2”)
root [9] html.SetOutputDir(“C:/Users/MK/Desktop/test2”)
root [10] html.MakeClass(“test”)
Info in THtml::CreateListOfClasses: Initializing - this might take a while…
Info in THtml::TFileSysRoot::Recurse: scanning C:/Users/MK/Desktop/test2…
Error in : compilation of TPRegexp(\b(include|CVS|test|tutorials|doc|li
b|python|demo|freetype-|gdk|libAfterImage|etc|config|build|bin)\b|(\bC:\Users\MK
\Desktop\test2\b)) failed at: 108 because PCRE does not support \L, \l, \N, \U,
or \u
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Error in : pcre_exec error = -2
Info in THtml::CreateListOfClasses: Cannot find header file for TObject at inc
lude/TObject.h given the input path C:/Users/MK/Desktop/test2.
Info in THtml::CreateListOfClasses: Assuming documentation is not for ROOT cla
sses, or you need to pass the proper directory to THtml::SetInputPath() so I can
find include/TObject.h.
Warning in TClass::TClass: no dictionary for class ROOT::Math::IMinimizer1D is
available
Warning in TClass::TClass: no dictionary for class iterator<bidirectional_iter
ator_tag,TObject*,long,const TObject**,const TObject*&> is available
Warning in TClass::TClass: no dictionary for class iterator<random_access_iter
ator_tag,TString,long,TString*,TString&> is available
Warning in TClass::TClass: no dictionary for class iterator<random_access_iter
ator_tag,int,long,int*,int&> is available
Warning in TClass::TClass: no dictionary for class iterator<random_access_iter
ator_tag,string,long,string*,string&> is available
Warning in TClass::TClass: no dictionary for class vector<TString,allocator >::const_iterator is available
Warning in TClass::TClass: no dictionary for class vector<int,allocator >
::const_iterator is available
Warning in TClass::TClass: no dictionary for class vector<string,allocator >::const_iterator is available
Warning in THtml::CreateListOfClasses: Cannot find the header for the followin
g classes [reason]:
Warning in THtml::CreateListOfClasses: test [header test.hpp not found]
Warning in THtml::CreateListOfClasses: THtml cannot find all headers and sourc
es.
Warning in THtml::CreateListOfClasses: You might need to adjust the input path
(currently C:/Users/MK/Desktop/test2) by calling THtml::SetInputDir()
Warning in THtml::CreateListOfClasses: Product not set. You should call gHtml-

SetProduct(“MyProductName”);
Info in THtml::CreateListOfClasses: Initializing - DONE.
Error in THtml::MakeClass: Unknown class ‘test’!
test2.zip (13.5 KB)

Hi,

argh, windows backslash. I’ll come up with a patch. Until then you might get around the issue by setting the output path as “.”

Cheers, Axel.

Hi,

I keep checking periodically whether this problem has been fixed but as of ROOT version 5.26/00b document generation via THTML still doesn’t work on Windows. I think the parsing of the directory path with the implementation filenames is messed up but I’m not quite sure where exactly is the problem.

Is there any chance this will be fixed “soon”?
Is there a workaround?

Thanks,

Marios

Hi,

sorry, I’m looking at it right now. Did the workaround I suggested not help?

Cheers, Axel.

Thanks,

No, your earlier workaround didn’t work for me.
I also tried instead of using SetSourceDirectory to directly set the full path and name via

MyClass::Class()->SetImplFileName(“C:\path\MyClass.cpp”)

but this didn’t work either.

Marios