14
votes

I am trying Graphviz and doxygen on a rather large C++ library to generate UML. It generates the .dot files but then says it can't open the .map files.

I am running doxygen 1.8.3 and 2.30.1 installed via the msi on Windows 7 64bit. I also manually set the path to the Graphviz bin folder.

Errors look like: error: problems opening map file /inherit_graph_11.map for inclusion in the docs!

4
do you also get the "If you installed Graphviz/dot after a previous failing run, try deleting the output directory and rerun doxygen" error? Can you try deleting the output and rerunning? When opening a cmd.exe (hit start->execute) and entering "dot", does it find the tool and wait for an input?x29a
Thanks. I just figured it out. I had set my environment var PATH to find the dot command. However, I did not update path in the Graphviz Settings.ini file. The installer (msi) must have set it to Program Files instead of Program Files (x64). I fixed the path and it now all works. BTW, before figuring this out, I did try deleting the output and it still failed. And I was able run dot from a command line.user2632182
Thanks for this comment - I had identical issue with Settings.iniPavle Gartner

4 Answers

30
votes

I know you found your solution, but for the sake of people like myself coming from Google, I'd like to make this as easy as possible for everyone.

If you're on Windows, and have installed both Doxygen and Graphviz, or if you're on Linux and have used apt-get install doxygen graphviz, the next step is to make sure that you're able to run the dot command from the command prompt/terminal. You can do this by making sure that the Graphviz/bin folder is appended to your PATH file.

Refer to this answer (removed by SO so here is a archive.org link) if you need more details on how to properly set up Doxygen/Graphviz for visualizations

8
votes

Because I had simmilar problems and needed a lot of time to fix it, I will summarize the important facts for getting it running:

  • Install doxygen AND graphviz
  • Add the bin directory of graphviz to your windows path variable (e.g. C:\Program Files (x86)\Graphviz2.38\bin)
  • In the Settings.ini located in the graphviz bin directory, also set the path (e.g. binPath=C:\Program Files (x86)\Graphviz2.38\bin)
  • In doxygen, under the tab "Expert" -> Dot check "HAVE_DOT"
  • In doxygen, under the tab "Expert" -> Dot set "DOT_PATH" to your graphviz bin directory like above

These steps did it to make it working for me.

3
votes

On Windows 10 in 2017, I needed to:

  • Install graphviz from http://graphviz.org/
  • In the Dot heading under the Doxygen expert tab, populate DOT_PATH with "C:\Program Files (x86)\Graphviz2.38\bin"
  • In the Diagrams heading under the Doxygen Wizard tab, select "Use dot tool from the GraphVizPackage"
0
votes
  1. Go to Control Panel and search for Edit System Environment Variables
  2. Go to System Properties -> Environment settings -> Path
  3. Add the path to your Graphviz bin folder at the end of the Path variables.

    They are separated with a semicolon ";"
    See example below, where I added:

    ; C:\Program Files (x86)\Graphviz2.38\bin

Alternatively you can use the Setx command from the command window.

enter image description here enter image description here