【问题标题】:Doxygen and Graphviz on LionLion 上的 Doxygen 和 Graphviz
【发布时间】:2012-02-05 07:56:06
【问题描述】:

我已经在我的 mac(运行 Lion OS)上成功安装了 Doxygen 和 GraphViz,但是当我使用 graphViz 运行 doxygen 时,我收到以下错误消息:

1) sh: dot: command not found
2) Problems running dot: exit code=127, command='dot', arguments='"/Users/../xxx.dot" -Tpdf -o
3) error: problems opening map file /Users/.../xxx_graph.map for inclusion in the docs!
If you installed Graphviz/dot after a previous failing run, 
try deleting the output directory and rerun doxygen.

这一定是我的Graphviz/dot 路径有问题,但我不知道如何解决。

我已经使用 MacPorts 安装了 Graphviz,但我仍然收到相同的错误消息。

我能做些什么来解决这个问题?提前致谢!

【问题讨论】:

    标签: path doxygen graphviz


    【解决方案1】:

    感谢@cyfdecyf 和@fkerber 的回答。有了你的回答,我可以从控制台运行 dot 程序,但我无法用它运行 doxygen。我不知道,但是必须在 doxygen 用户界面中手动输入 dot 程序的路径。要做到这一点,必须点击 Expert -> dot (under topics menu) -> 并给出 DOT_PATH 下的路径,在我的例子中是 /usr/local/bin

    谢谢大家。

    【讨论】:

    • 为了后代,您应该接受这个答案。只需赞成其他两个答案,以承认这些指针确实有帮助。
    【解决方案2】:

    尝试以下方法:

    export PATH=/opt/local/bin:/opt/local/sbin:$PATH
    

    在命令行上发出这个,看看它是否能解决问题。您可能还需要将其添加到~/.profile

    如果您需要更多信息,请参阅MacPorts' doc

    【讨论】:

    • 请注意 - 如果您使用 zsh 并且在 .zshrc 文件中有 PATH 配置,则 GUI doxygen 工具将不会选择它。
    【解决方案3】:

    我认为您已将 dot 可执行文件的路径放在 PATH 变量中,这样如果有人只是在控制台中键入 dot 就可以找到它。

    也许这个页面可以帮助你: http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables

    【讨论】:

      猜你喜欢
      • 2013-03-03
      • 2013-07-29
      • 2015-12-10
      • 2012-03-18
      • 2013-08-15
      • 2011-12-18
      • 2014-10-11
      • 2018-02-11
      • 2015-09-15
      相关资源
      最近更新 更多