Error running 'root -l macro.C' on WinXP

Dear ROOTers

The following is a Windows-specific problem since I do not see it on Linux or Mac:
When trying to start a macro from the command line I get the following error:

C:\home\Rabbitus\CRAN\workspaces>root -l 'C:/home/Rabbitus/CRAN/myRlib/xps/rootsrc/macroOpenBrowser.C("C:/home/Rabbitus/CRAN/myRlib/xps/libs/xps.dll")'
Error in <TUrl::TUrl>: 'C:/home/Rabbitus/CRAN/myRlib/xps/rootsrc/macroOpenBrowser.C malformed, URL must contain "://"
Warning in <TApplication::GetOptions>: macro 'C:/home/Rabbitus/CRAN/myRlib/xps/rootsrc/macroOpenBrowser.C not found
root [0] .q

After adding the second slash I still have the problem:

C:\home\Rabbitus\CRAN\workspaces>root -l 'C://home/Rabbitus/CRAN/myRlib/xps/rootsrc/macroOpenBrowser.C("C://home/Rabbitus/CRAN/myRlib/xps/libs/xps.dll")'
Warning in <TApplication::GetOptions>: macro 'C://home/Rabbitus/CRAN/myRlib/xps/rootsrc/macroOpenBrowser.C not found
root [0] .q

In comparison, here is the output on my Mac:

coeurebooks-computer:/Volumes/CoreData/CRAN/Workspaces rabbitus$ root -l '/Users/rabbitus/Library/R/library/xps/rootsrc/macroOpenBrowser.C("/Users/rabbitus/Library/R/library/xps/libs/xps.so")'
root [0] 
Processing /Users/rabbitus/Library/R/library/xps/rootsrc/macroOpenBrowser.C("/Users/rabbitus/Library/R/library/xps/libs/xps.so")...
root [1] .q

First, in my opinion I should not have to add the second slash, since I am passing a path and not an url.
Second, why is the macro not found although the path is correct?

P.S.: I am using root 5.18/00

Best regards
Christian

[quote=“cstrato”]Dear ROOTers

The following is a Windows-specific problem since I do not see it on Linux or Mac:
When trying to start a macro from the command line I get the following error:

C:\home\Rabbitus\CRAN\workspaces>root -l 'C:/home/Rabbitus/CRAN/myRlib/xps/rootsrc/macroOpenBrowser.C("C:/home/Rabbitus/CRAN/myRlib/xps/libs/xps.dll")' Error in <TUrl::TUrl>: 'C:/home/Rabbitus/CRAN/myRlib/xps/rootsrc/macroOpenBrowser.C malformed, URL must contain "://" Warning in <TApplication::GetOptions>: macro 'C:/home/Rabbitus/CRAN/myRlib/xps/rootsrc/macroOpenBrowser.C not found root [0] .q [/quote]
Once again check that the full path for C:/home/Rabbitus/CRAN/myRlib/xps/rootsrc/macroOpenBrowser.C
is a correct one.

Try to use backslashes instated of slashes in your path for windows (as a test try).
Something like:
C:\home\Rabbitus\CRAN\myRlib\xps\rootsrc\macroOpenBrowser.C

But as far as I know Windows should understand both separates, backslashes and slashes. So maybe your problem arise somewhere else.

Thank you for your comment, however, please note that the full path was originally created automatically,
I have simple copied it, thus it is correct.
Using backslashes also does not help, and it does not explain why an error message in TUrl is called.
Christian

Hi Christian,

Please try:root -l C:/home/Rabbitus/CRAN/myRlib/xps/rootsrc/macroOpenBrowser.C("C:/home/Rabbitus/CRAN/myRlib/xps/libs/xps.dll")(without the single quotes)

Cheers,
Bertrand.

Dear Bertrand

Removing the single quotes (or adding double quotes instead of single quotes) results in the error:
Error: Symbol C: is not defined in current scope
Error: Symbol home is not defined in current scope
etc

This is really strange.

Best regards
Christian

OK, then try:root -l C:/home/Rabbitus/CRAN/myRlib/xps/rootsrc/macroOpenBrowser.C(\"C:/home/Rabbitus/CRAN/myRlib/xps/libs/xps.dll\")(note the backslashes before the double quotes)

Cheers, Bertrand.

Dear Bertrand

Thank you, using backslashes finally works.
This means on Windows I have to remove the single quotes but add backslashes,
while on Mac/Linux I have to add the single quotes ans remove the backslashes.

Best regards
Christian