A problem using root -l -q command

When I work in root enviroment, I have no problem to run my program:
.x ANLtoroot.cpp(“tape2.data01_01”, “fun.root”)
but when I tried to use it outside root by a shell command:
root -l -q ANLtoroot.cpp(“tape2.data01_01”, “fun.root”)
Then I got error messages:
nsl0:~/ANLtoroot% root -l -q ANLtoroot.cpp(“tape2.data01_01”)
root [0]
Processing ANLtoroot.cpp(“tape2.data01_01”)…
Error: Can not access pointer to function 0x0 from interpreter(1) FILE: LINE:0
Error: Function ANLtoroot(“tape2.data01_01”) is not defined in current scope FILE: LINE:0
Possible candidates are…
filename line:size busy function type and name
ANLtoroot.cpp 64:55 0 public: Int_t ANLtoroot(char* argv1,char* argv2);

Why did it happen? How can I solve the problem? My program is in the same directory where I run the command.

Thank you very much!

Maybe it is just a copy/paste error but you said

[quote]when I tried to use it outside root by a shell command:
root -l -q ANLtoroot.cpp("tape2.data01_01", "fun.root") [/quote]
then you had omly

and the appropriate error message:

[quote]Processing ANLtoroot.cpp(“tape2.data01_01”).

Error: Function ANLtoroot(“tape2.data01_01”) is not defined in current scope FILE: LINE:0[/quote]So use the command you intended and it should work.

Philippe.

sorry, it’s a copy/paste error when I wrote the original post. But it’s not the one which causes my problems.
I thought that comma between the two parameters may need special treatment. So I changed my codes to accept only one parameter, but the problem still happen.

Send me your example.

Philippe.

PS. For command line I prefer to use

Thank you very much!
Use the way which you mentioned in your post, I successfully ran my program. So I guess the comma really does matter.