I am not sure what am I doing wrong but when I try to compile a program with:
.L prog.C+
I always get the error:
root [1] .L prog.C+
Info in TWinNTSystem::ACLiC: creating shared library C:\root\cu_C.dll
’rootcint’ is not recognized as an internal or external command,
operable program or batch file.
Error in : Dictionary generation failed!
Info in : Invoking compiler to check macro’s validity
’cl’ is not recognized as an internal or external command,
operable program or batch file.
This happens even with the most trivial programs like:
#include
using namespace std;
[quote]rootcint’ is not recognized as an internal or external command,
operable program or batch file. [/quote]This means that the root executable (root.exe, rootcint.exe) are not in you PATH. You need to add %ROOTSYS%\bin to your PATH.
[quote]‘cl’ is not recognized as an internal or external command,
operable program or batch file. [/quote]
This means that the microsoft C++ compiler has not been setup properly, you will need to (after installing the compiler) run microsoft’s script call vcvars32.bat.
If you do not have the C++ compiler, we will not be able to compile your script.
You will, however, still be able to interpret it:.L prog.C
Cheers,
Philippe
PS. Note that you should not use the name ‘main’ for your function unless you intend to compile and link and executable (so never use the name main in a script and/or macro).