Hi , i’m a cernroot beginner and i’m having trouble with a (maybe stupid) name question. For example, in Linux (i use Gedit to write my scripts), i’ve this file “test.C”:
int test()
{
printf(“TEST \n”);
return 0;
}
and, if i run “root test.C”, it works:
root [0]
Processing test.C…
TEST
(int) 0
but if i change the name in the script (not the name of the file in .C) as follows and i run “root test.C” it doesn’t work:
int main()
{
printf(“TEST \n”);
return 0;
}
this is the error
root [0]
Processing test.C…
warning: Failed to call test()
to execute the macro.
Add this function or rename the macro. Falling back to .L
.
Why this happens? And how could i solve this?
Thanks!!!