sh:gnuplot:在Gnuplot + Xcode中找不到命令
有一个类似的问题要问我,但是答案还不是解决方案,因此,如果我能对此有所帮助,将不胜感激.
There was a similar question to mine however the answers were not quite solutions so if I could get some help with this it would be greatly appreciated.
问题在于,当我编译时,Xcode给出了上述的sh:gnuplot:命令找不到的错误.
The problem is that when I compile, Xcode gives the aforementioned error of sh: gnuplot: command not found.
我在终端中检查了which gnuplot
,并且正如Macports所期望的那样,它在/opt/local/bin/gnuplot
中.此外,printf("PATH=%s\n", getenv("PATH"));
显示了我怀疑其中存在问题的路径PATH=/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
,但我不确定如何解决此问题.
I checked which gnuplot
in terminal and as expected from macports it is in /opt/local/bin/gnuplot
. Also printf("PATH=%s\n", getenv("PATH"));
shows the path PATH=/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
I suspect therein lies the problem but I am not sure how to fix it.
提前谢谢!
在脚本中用/opt/local/bin/gnuplot
替换gnuplot
的出现,以使$PATH
脱离等式.
Replace occurrences of gnuplot
, in your script, with /opt/local/bin/gnuplot
to take $PATH
out of the equation.