Running Root from Windows 10 command prompt

Good evening,

I’m an undergraduate studend and I’ve just begun using ROOT (1 month ca.)

I’ve got a problem with running ROOT: I was told not to open my scripts by doubleclicking on them, rather to open them from the command prompt.
Furthermore, I was told to recall them with c++ extension rather than the simple .c (example: namefile.c++ and not namefile.c). The two ways are not equivalent and I MUST open them in c++.
At the university we use ubuntu and all goes well, at home I’m using a Windows 10 machine, I can open root from the prompt but then I don’t know how to correctly open the files in .c++.
What should I do?
I beg your help, I need to solve the problem for my exams and I know only the really basics of programming, please explain me what to do clearly and simply, without too much jargon.

Thank you very much



Hi Andrea,

On Windows, if you want to use ACLiC (.c++), you must open a “Developer command prompt for VS2013” if you have Visual Studio 2013 on your system (you must have Visual Studio installed in order to compile your code). Then, cd to the directory where you have your code (your macro). Finally, start root, and execute your macros the same way than on Linux. Depending on the way ROOT has been installed, you may have to call C:[wherever root is]\bin\thisroot.bat to set-up the necessary environment variables.

EDIT: BTW, you must use the exact same version of Visual Studio than the one used to build ROOT itself.

Cheers, Bertrand.