'cl.exe' is not recognizedas an internal or external command, operable program or bath file, HELP!

Hello, i am using this programs:
OS: Windows 10
Root: Windows Visual Studio 2013 root_v5.34.36.win32.vc12.exe
Windows VS: Windows visual studio 2015 (instead of the 2013)

And when i try to run this code(v1.1): hepforge.org/downloads/tglaubermc
the v1.1, and when i run it (.L) a receive this message:

root[0] .L runglauber_v1.1.C+ Info in <TWinNTSystem: :ACLiC>: creating shared library C:\root_v5.34.36\macros\runglauber_v1.1.C.dll 'cl.exe' is not recognized as an internal or external command, operable program or bath file. Error: external preprocessing failed. (0) !!!Removing C:\root_v5.34.36\macros\runglauber_v1_1_C_ACLiC_dict.cxx C:\root_v5.34.36\macros\runglauber_v1_1_C_ACLiC_dict.h!!! Error: C:\root_v5.34.36\bin\rootcint: error loading headers... Error in <ACLiC>: Dictionary generation failed! Info in <ACLiC>: Invoking compiler to check macro's validity root[1]

How do i fix it?

search.php?keywords=windows+internal+external+command

i still don’t know how to solve my problem, it’s my first time using ROOT

Since cl.exe is the Microsoft compiler, You to follow this advice:

[quote=“bellenot”]You have to open a “Developper Command Prompt” from the “Visual Studio Tools” folder of the Visual Studio Menu, or call “C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat” (with quotes) from a regular command prompt, in order to use nmake.
[/quote]
cl.exe and nmake.exe are both part of Microsoft Visual Studio. You only have to adapt to the version of Visual Studio which is installed on your system…

Cheers, Bertrand.

how do i adapt it?

What is the version of Visual Studio which is installed on your system?

2015

So this is most probably not going to work, since the last supported version is 2013…

i have just installed Visual Studio 2013

So you can now follow the advice I gave previously…

i have opened the “Developper Command Prompt”, what do i do now?

So now you can start root: First, execute thisroot.bat, located in the bin subdirectory of the root directory (if you know where root has been installed…), then start root, then type “.L runglauber_v1.1.C+”, as you did before…

It worked, thank you!

You’re very welcome! :slight_smile:

Cheers, Bertrand.

Hi !

I have the same problem, I tried to use the command taking care of puting quotes but the system is asking me the c


can you tell how to get the right parameters for my PC
see next post:

Thanks in advance
Rodrigo

detail on my config

Call vcvars32.bat:

C:\Users\bellenot>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.8
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'

Thanks a lot it worked
we now have a Pb with declaration

double Tab[NbElem];
where before
NBElem should be compute dby line
static const short NbElem = …

this work on linux but no on Windows
Thanks in advance
Rodrigo

Right. It doesn’t work on Windows you can simply use:

std::vector<double> Tab;
Tab.reserve(NbElem);