I am trying to make a dictionary to my new class. The message I receive is
[quote]C:\veghj\projects\root\ewa>rootcint tdocfile.cxx -c tdocfile.h
#error tdocfile.h/C is only for compilation. Abort cint.
Error: link requested for unknown class tdocfile FILE:G__auto1144LinkDef.h LINE:7
Warning: Error occured during reading source files
Warning: Error occured during dictionary source generation
!!!Removing tdocfile.cxx tdocfile.h !!!
Error: rootcint: error loading headers…
I did it as shown in the docs and I am surprised on the messages.
1./ Why rootcint deletes its input file? I agree it shall delete the wrong output file it creates, but I think it is very unfriendly that it deletes my input file. Accidentally I have a backup in another directory, but how can I correct the mistake if the input file is deleted? If this is absolutely necessary, the docs must warn that I might loose my work when experimenting with this utility.
Shall I be prepared for similar kind actions from the other utilities?
2./ Where can I find out what is the problem? I do not find the message “#error tdocfile.h/C is only for compilation. Abort cint.” very informative.
3./ From the temporary file (which, interestingly enough, is not deleted) I find that in line 7
the class name is taken from the file name of the header file, rather than the content of the file. Why is it so? As far as I know it is not necessary at all to give the name of the class to the header file. In my case, it is so, but Windows is not case sensitive, so I used lower case only. What if the header contains more than one class?
BTW: after correcting the command there is no real change, although TDocFile is there in the file (until the command deletes it).
[quote]C:\veghj\projects\root\ewa>rootcint tdocfile.cxx -c TDocFile.h
Error: link requested for unknown class TDocFile FILE:G__auto2736LinkDef.h LINE:7
#pragma link C++ class TDocFile;
4./ In general: I receive several lines of error messages, but neither of them gives a hint what is wrong. Could this utility be made a little more user friendly?
So, I am sorry, but could you please advice what is wrong with my file rootcint does not like? I cannot figure out myself. The code is attached.
TDocFile.h (2.62 KB)