TTree::SetMaxTreeSize() and Long64_t

I don’t know if I am here right for this very basic question. Please don’t mind that I post it here. I am very grateful for every answer.
I am trying to compile a standalone program using root file with a large TTree object inside. So I have to set the max size of the tree using SetMaxTreeSize(). On Linux system that is not a great deal. But now I am trying to compile the same code for windows. And it turns in deed to be a problem: the following code won’t get compiled:

Long64_t size = 16000000000; TTree::SetMaxTreeSize(size);
The error message reads

To compile the program I chose to use Mingw as compiler.
The compiler seems to make no difference between Long_t and Long64_t. It doesn’t make sense if I can’t set the tree size bigger than 1900000000, which is the default value of the function. So there must be a solution and I must have made some mistakes. Please help me!


Simon Lu

Hi Simon,

Sorry, but Mingw compiler is not supported by ROOT. You can use the free Microsoft Visual Studio Express edition instead.

Cheers, Bertrand.

you are missing a LL behind your number declaration so the compiler knows the integer literal is of long long type (=64bit integer of gcc) and not long:
Long64_t size = 16000000000LL;
(LLU for unsigned long long)