Problems with ACLiC

Hi,

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;

int main ()
{
cout << “Hello World!”;
return 0;
}

Could you help me with this?
Thanks,
Ion

Hi,

[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).

Thank you for your answer. I setup the C++ compiler and now it work; it generates the files:
.def
.dll
.exp
.lib
.rootmap

But I do not know what I should do with them? How can I run the program now? (Can I import them in Visual C++?)

Sorry for the silly questions but I am new with this.
Ion

Hi,

please read the users guide on how to execute code in ROOT. And btw, your code should not have a function called “main()”.

Cheers, Axel.