A problem in compiling

Dear ROOTers,

I have written a simple code to compile but fail, which sounds incredible to me.

"hi.c"
Int_t hi()
{
return 0;
}

when I compile it with “.L hi.c++” , several errors come:
‘ptrdiff_t’: is not a member of ‘std’
‘iterator’: too many template arguements
’iterator<struct std::bidirectional_iterator_tag,class TObect *,int>’: base class undefined.

By the way, I am running ROOT v.5.21 on Windows Xp, with MS Visual C++ 6.0 installed.
Is it the problem of MSVC or do I miss some include files?

Thanks a lot!

Hi,

We no longer support MS Visual C++ 6.0 since it is very broken and a free download of the version 8.0 is available.

Cheers,
Philippe.

I have download a Visual C++ 9.0 but fail to compile the file either.

ROOT says “cl.exe” is not an availble executable file and “cl.exe” is the compile driver of Visual C++ 9.0.
Does the version of Visual C++ 9.0 sound too new to ROOT? Should I install VC 8.0 instead?

Thank you

[quote]ROOT says “cl.exe” is not an availble executable file and “cl.exe” is the compile driver of Visual C++ 9.0.
Does the version of Visual C++ 9.0 sound too new to ROOT? Should I install VC 8.0 instead? [/quote]ROOT works with both vc9.0 and vc8.0. The issues is that cl.exe is NOT in the %PATH%. You need to ‘setup’ vc9.0 in the shell you start root in. Usually this can be done by executing vcvars32.bat

Cheers,
Philippe.

Thank you very much!!!

[quote=“pcanal”][quote]ROOT says “cl.exe” is not an availble executable file and “cl.exe” is the compile driver of Visual C++ 9.0.
Does the version of Visual C++ 9.0 sound too new to ROOT? Should I install VC 8.0 instead? [/quote]ROOT works with both vc9.0 and vc8.0. The issues is that cl.exe is NOT in the %PATH%. You need to ‘setup’ vc9.0 in the shell you start root in. Usually this can be done by executing vcvars32.bat

Cheers,
Philippe.[/quote]

I tries successful with VC7 installed too.