Problem with TTable.h under Windows

Dear ROOTers,

I am using ROOT (root_v3.10.01.win32gdk.tar.gz version) under

Windows 2000 and XP and use MS Visual C++ 6.0 to create
stand-alone applications. When I try to include TTable.h into my
application, my compiler reports errors:

c:\root\include\tdatime.h(85) : error C2248: ‘fDatime’ : cannot access
protected member declared in class 'TDatime’
c:\root\include\tdatime.h(32) : see declaration of 'fDatime’
c:\root\include\tdatime.h(85) : error C2248: ‘fDatime’ : cannot access
protected member declared in class 'TDatime’
c:\root\include\tdatime.h(32) : see declaration of ‘fDatime’

pointing to:

inline Bool_t operator==(const TDatime &d1, const TDatime &d2)
{ return d1.fDatime == d2.fDatime; }
inline Bool_t operator!=(const TDatime &d1, const TDatime &d2)
{ return d1.fDatime != d2.fDatime; }

What should I do?

Cheers,
             Elena Litvinenko

Hi Elena,
strange, these operators declared as “friend” (in TDatime.h)
I can not reproduce it. Might be compiler option problem.
Are you using makefile (like in $ROOTSYS/test) or VC project?
What is your compiler flags?
Try to set them as

-O2 -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL

HTH. Regards. Valeriy

Hi,
if I remember correctly this was an issue with VC6 which was fixed in a service pack. Elena, do you have the latest VC6 service pack installed?
Axel.

I confirm Axel’s point. This was a bug in early versions of VC++6. You must apply service packs for VC++6 (or move to VC++7)

Rene

Hello Lena,
Can you show us your source file? :question:

Hi, rooters,

Thanks a lot all people, who tried to help. Axel and Rene were absolutely right, Service Pack 5 solved the problem.

 Cheers,
              Elena 

:laughing: