Graphviz Dot file failing to compile in Windows Em

2019-09-19 02:04发布

问题:

I took the following steps to use Graphviz Dot mode in emacs:

  • as per instructions at http://ppareit.github.io/graphviz-dot-mode/, added

    (load-file "PATH_TO_FILE/graphviz-dot-mode.el")

    to my .emacs file (C:/emacs/.emacs for me), and copied the text from http://www.graphviz.org/Misc/graphviz-dot-mode.el to a file in that path.

  • in Emacs, created a new file (c-x c-f) and named it something.dot. Copied the DOT text from the aforementioned website, which became highlighted for dot syntax.

  • Selected all text and pressed C-c c. Was given the following message:

    dot -Tpng c:/emacs/dot_test.dot > c:/emacs/dot_test.png 'dot' is not recognized as an internal or external command, operable program or batch file.

    Compilation exited abnormally with code 1 at Thu Jul 30 06:36:12

回答1:

You have to first install graphviz to your system. The Windows installer is found here.

I was able to use it successfully without making any changes to my PATH (which they say would be an issue), however be aware you may need to add it to your path.