I 'm totally new to root and have problem even running some basic scripts, I think I might have set up root improperly causing me these errors. But then again I’m not sure.
When I try to run;
TF1 f1(“func1”,“sin(x)”,0,10)
f1.draw()
I receive
Error: Can’t call TF1::draw() in current scope (tmpfile):1:
Possible candidates are…
(in TF1)
(in TFormula)
*** Interpreter error recovered ***
I’ve already read all the setup guides on the website, and still can’t understand what I’m doing wrong.
Did you run (in the “xterm” in which you plan to run “root”, but before you actually run “root”):
[bash]$ source /path/to/your/ROOT/installation/bin/thisroot.sh
[csh]$ source /path/to/your/ROOT/installation/bin/thisroot.csh
I’m not sure if this code means the same as the other one I tried but here is another screenshot http://i.imgur.com/07zNEuV.png
Thanks for all the help
The first three lines of your terminal screenshot should look like:
Last login: … on ttys…
Anl-MacBook-Pro:~ appleapple$ source /Users/appleapple/root/ROOTSYS/bin/thisroot.sh
Anl-MacBook-Pro:~ appleapple$ root
It seems to me that you did not compile ROOT yourself, but you took ROOT binaries from somewhere and these binaries were created on a system which is “newer” than yours. Either you compile ROOT yourself on your system, or you need to “upgrade” your system (the first “offending” system library, visible in your screenshot, is the “/usr/X11/lib/libpng12.0.dylib” -> you need a newer version of it).
This is weird then.
Maybe you should report the exact version of your operating system, compiler, … (Xcode? X11User? XQuartz?)
Try (inspect absolute paths of all libraries reported by “ldd”):
root-config --bindir
ldd root-config --bindir/root
ldd root-config --bindir/root.exe
root-config --libdir
ldd root-config --libdir/libTree.so
root-config --etcdir
BTW. There’s one thing I don’t understand. If you built your ROOT as you show in your last post, how come it resides in “/Users/appleapple/root/ROOTSYS/[bin|lib]”? It should be in “/Users/appleapple/root/[bin|lib]” (no “/ROOTSYS/” in the middle).