Hi,
when i try to compile a program under ROOT i get:
root [3] .L e:\Amir\prova.cc++
Warning in : e:\Amir is not writeable!
Warning in : Output will be written to C:\Users\Amir\AppData\Local\Temp
Info in TWinNTSystem::ACLiC: creating shared library C:\Users\Amir\AppData\Loc
al\Temp\Amir\prova_cc.dll
"cl" non è riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
(it means: “cl” is not recognized as a internal or external command , an executable file or a batch file)
Error: external preprocessing failed. (0)
!!!Removing C:\Users\Amir\AppData\Local\Temp\Amir\s5os_5.cxx C:\Users\Amir\AppDa
ta\Local\Temp\Amir\s5os_5.h !!!
Error: rootcint: error loading headers…
Error in : Dictionary generation failed!
Info in : Invoking compiler to check macro’s validity
"cl" non è riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
(it means: “cl” is not recognized as a internal or external command , an executable file or a batch file)
root [4]
What’s happening? if i just use
.L e:\Amir\prova.cc
all works
The path to the VC compiler (cl.exe) must be in your PATH environment variable. To do so, you can call: c:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat
when opening a command prompt.
You can also create a shortcut on your desktop with the target being i.e.:
%comspec% /k ""c:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat"" x86
(This is an example with Vista x64, so please adapt to the standard Vista)
Or you can add the MSVC pathes to your PATH as following:
c:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE;c:\Program Files (x86)\Microsoft Visual Studio 8\VC\BIN;c:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools;c:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\bin;c:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\bin;c:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\bin;c:\Windows\Microsoft.NET\Framework\v2.0.50727;c:\Program Files (x86)\Microsoft Visual Studio 8\VC\VCPackages;
[quote=“Amir”]after a search on my pc, i didn’t find any “vcvarsall.bat”.
there is a way to get it somewhere?[/quote]I would advise to add two simple MSDOS batch files to your %ROOTSYS%/bin. launchroot.cmd:
SET ROOTSYS="your ROOTSYS directory here"
IF EXIST "%VS80COMNTOOLS%\vsvars32.bat" (
call "%VS80COMNTOOLS%\vsvars32.bat
call "%ROOTSYS%\bin\rootenv.cmd"
)
SET PATH=="your ROOTSYS directory here";%PATH%
start "ROOT" %ComSpec% /k "%ROOTSYS%\bin\root.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9 and rootenv.cmd:
SET INCLUDE=%ROOTSYS%;%ROOTSYS%\include;%INCLUDE%
set LIB=%ROOTSYS%;%ROOTSYS%\lib;%LIB%
if EXIST "%ProgramFiles%\Microsoft Platform SDK for Windows Server 2003 R2\lib" (
SET LIB=%ProgramFiles%\Microsoft Platform SDK for Windows Server 2003 R2\lib;%LIB%
). Now to start ROOT application with ACliC turned properly against of the local VC++ installation one should invoke “launchroot.cmd” rather “root.exe”. All files above are generated and placed automatically by the ROOT setup from root.bnl.gov