faca87
March 17, 2022, 6:33pm
1
Hello, I work in an educational project promosed by INFN dedicated to high school students. We made an experiment then students must to compile a report. I wrote the macro to make a fit, but I wouldn’t give to student the plot and the fit result…I would ask them to try to use ROOT to run the macro. The last ROOT version for Windows needs VS2019 but in the visual studio download page Download degli strumenti di Visual Studio - installazione gratuita per Windows, Mac e Linux only the VS2022 is available. Previous version Download meno recenti di Visual Studio: 2019, 2017, 2015 e versioni precedenti are available only for registered users. Can they download the VS2022 instead of VS2019 to use ROOT? Obviously I mean the precompiled file https://root.cern/download/root_v6.26.00.win32.vc16.exe
@bellenot sure you know it
Hi both version should work just fine (latest VS 2019 and latest VS 2022)
faca87
March 17, 2022, 7:18pm
3
Thank you @bellenot
I’ve just tried to install it but opening it I get this error then it crashes
So you installed VS 2022 and started ROOT v6.26.00 from a x86 Native Tools Command Prompt for VS 2022
? Here is what I get:
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.1.1
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'
C:\Users\sftnight>cd Downloads
C:\Users\sftnight\Downloads>root\bin\thisroot.bat
C:\Users\sftnight\Downloads>root
------------------------------------------------------------------
| Welcome to ROOT 6.26/00 https://root.cern |
| (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for win32 on Mar 03 2022, 06:51:13 |
| From tags/v6-26-00@v6-26-00 |
| With MSVC 19.29.30139.0 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
root [0]
faca87
March 17, 2022, 7:36pm
5
ok sorry! using the x86 native it works!
in the last time i was using a version installed by the master then i used the developer prompt…but I remembered that in the past the precompiled one worked also just clicking on the ROOT icon in the windows applications list
Yes, but then for this you must globally set the environment variables, like it is done by [vcvarsall.bat] Environment initialized for: 'x86'
faca87
March 17, 2022, 7:43pm
7
Which file? I tried to add thisroot.sh
but i get the same error
Well, C:\root_v6.26.00\bin\thisroot.sh
is a (bash) shell script…
So you must at least set these variables (as they are set in thisroot.bat
):
ROOTSYS=C:\root_v6.26.00
PATH=%ROOTSYS%\bin;%PATH%
and the ones set by vcvarsall.bat
.
I’m pretty sure if you search the forum you will find some hints :
faca87
March 17, 2022, 9:27pm
9
Thank you @bellenot
A question.
A student installed root.
She didn’t set ant enviroment variable, but she can open root by clicking on the icon in the windows app list.
On the contrario she said that opening the x86 native and digiting root she get the error that root isn’t a program, batch file etc.
Then in her case she can use root by the app list (wirhout setting environment variables) but she can’t by x86 …how is it possible?
IIRC, the installer set the correct environment variables for the shortcut (but I’ll have to cross-check…).
faca87
March 18, 2022, 5:49pm
11
Thank you @bellenot last question please
Is there a way to run macros everywhere using the ROOT app??
I mean…running ROOT (the precompiled one) by x86 it’s possible to run the macro everywhere, for example:
but if ROOT is launched by the app list of windows is there a way to run the macro everywhere instead of from the macros directory?
Try:
root [0] gSystem->cd("C:/analisi");
root [1] .x crflux.cpp
system
Closed
April 2, 2022, 2:21pm
14
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.