sh: 点: 未找到命令 + doxygen +狮子
- MacOS 版本:10.7.2 (Lion)
- Doxygen 版本:1.7.5.1
- Graphviz 版本:2.29
Doxygen 配置:
DOT_PATH = ../../../../Applications/Contents/MacOS/Graphviz
HAVE_DOT = YES
SHORT_NAMES = YES
从日志控制台,第一行给出警告:
警告:在 ../../../../Applications/Contents/MacOS/Graphviz 中找不到点工具
我尝试了各种组合,但警告并没有消失,尽管它确实生成了图像。
使用 9 个并行线程生成点图...
图 1/68 的运行点
sh:点:找不到命令运行点时出现问题:退出代码=127,命令='dot',参数='"/Users/salilk/Documents/project/DoxygenDocs/html/a00033.dot" -Tpng -o "/Users/salilk/Documents /project/DoxygenDocs/html/a00033.png"'
在 html 目录中,.dot 文件已生成,但没有.png。
现在,如果我从终端执行相同的命令,.png 文件就会生成并显示在其 .html 文件中。
控制台的另一个错误是:
错误:打开地图文件 /Users/salilk/Documents/A2O Collaborate/DoxygenDocs/html/a00032.map 以包含在文档中时出现问题! 如果您在上次运行失败后安装了 Graphviz/dot,请尝试删除输出目录并重新运行 doxygen。
这与上述问题有关吗?
我之前在 Windows 机器上使用过 Doxygen,没有出现这些错误,我们需要针对 Mac 进行任何配置吗?
- MacOS version: 10.7.2 (Lion)
- Doxygen version: 1.7.5.1
- Graphviz version: 2.29
Doxygen configuration:
DOT_PATH = ../../../../Applications/Contents/MacOS/Graphviz
HAVE_DOT = YES
SHORT_NAMES = YES
From the log console, first line it gives a warning:
warning: the dot tool could not be found at ../../../../Applications/Contents/MacOS/Graphviz
I have tried various combinations but the warning does not go away, although it does generate the images.
Generating dot graphs using 9 parallel threads...
Running dot for graph 1/68
sh: dot: command not foundProblems running dot: exit code=127, command='dot', arguments='"/Users/salilk/Documents/project/DoxygenDocs/html/a00033.dot" -Tpng -o "/Users/salilk/Documents/project/DoxygenDocs/html/a00033.png"'
In the html directory the .dot files have been generated but no .png.
Now if I execute the same command from the Terminal the .png file gets generated and is displayed in its .html file.
Another error from the console is:
error: problems opening map file /Users/salilk/Documents/A2O Collaborate/DoxygenDocs/html/a00032.map for inclusion in the docs!
If you installed Graphviz/dot after a previous failing run, try deleting the output directory and rerun doxygen.
Is this related to the above problem ?
I have used Doxygen before on a Windows machine and didn't have these errors, do we need to do any configurations specific for Mac?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
将 DOT_PATH 设置为:
/usr/local/bin
Set the DOT_PATH to:
/usr/local/bin
将 doxygen.conf 中的 DOT_PATH 设置为空白。这是有效的,因为 doxygen 会在你的路径中寻找。
我用 macports 安装了 doxygen,所以点位于 /opt/local/bin/dot
set DOT_PATH in your doxygen.conf to blank. That works because doxygen will look in your path for.
I installed doxygen with macports, so dot is at /opt/local/bin/dot
对于那些在 Doxfile 上调用 CMake 的 configure_file() 的人,另一种选择是:
对我来说,即使 dot 的路径位于 $PATH 中,上述也是我可以使其工作的唯一方法。去算算吧。
For those who call CMake's configure_file() on their Doxfile, an alternative is:
For me, even though dot's path was in $PATH, the above is the only way I could make it work. Go figure.
DOT_PATH 必须用引号设置,否则带有空格的路径将不起作用
The DOT_PATH must be set withing quotes else the paths with whitespaces won't work