If I run the code in CINT, it will write the canvas size that I have defined. But if I compile the code (g++ …) and run then it does not care what the size of the canvas I have defined, it always writes the default size (800 x 600).
If I run the code in CINT, it will write the canvas size that I have defined. But if I compile the code (g++ …) and run then it does not care what the size of the canvas I have defined, it always writes the default size (800 x 600).
That’s an interesting issue. You seem to suggest that if one uses ROOT libraries, one needs to create a TApplication object. A similar issue has been reported here [url]Strange behavior reading TFile in Windows where a creation of a TApplication object helped on Widows. Is this precisely described somewhere?
Sorry, but I must disagree.
The outcome of the discussion [quote] https://root-forum.cern.ch/t/strange-behavior-reading-tfile-in-windows/12063/1[/quote] was that due to a Window’s linker idiosyncrasy, one needs to “enforce” loading of the “Hist” library. Apparently, one of the side effects of the creation of a TApplication object is that the “Hist” library is also lined in. But still, there was NO need to create it - one is free to load the “Hist” library manually (without creating the TApplication object, and in fact on LInux even the “manual loading” was not needed at all).
Now, your statement in the current topic is significantly different. You say that is is REQUIRED to create a TApplication object, otherwise the application misbehaves.
So the questions are … “when is it required?” and “when can it be safely skipped?”.
Could you, please, raise this issue on some ROOT team’s internal forum?
I believe, it would be useful if this issue was precisely and clearly documented somewhere.