1

I am trying to use Doxygen to generate the documentation of my c++ program, and I wish to have the dependency graph as well. So I installed graphviz-2.40.1, the path to graphviz is shown below:

which dot
/usr/local/bin/dot

I turned on the HAVE_DOT to YES, and also set the DOT_PATH to be /usr/local/bin/.

However if I run doxygen, it fails to generate the dependency graph and throws me the error:

Format: "png" not recognized. Use one of: canon cmap cmapx cmapx_np dot dot_json eps fig gv imap imap_np ismap json json0 mp pic plain plain-ext pov ps ps2 svg svgz tk vml vmlz xdot xdot1.2 xdot1.4 xdot_json
error: Problems running dot: exit code=1, command='/usr/local/bin/dot', arguments='"/home/shiqihe/Documents/code/cpp/docs/doxygen/html/dg__main_8cpp__incl.dot" -Tpng -o "/home/shiqihe/Documents/code/cpp/docs/doxygen/html/dg__main_8cpp__incl.png"'

I have searched for the solution and find this: soluiton

I tried sudo dot -c but it did not work. Still gave me the same error.

Any help? Thank you!

Shiqi He
  • 95
  • 3
  • 10

1 Answers1

0

You already mentioned the "solution" which says:

It looks like there is a bug in the official install. After running the command 'dot -c', the problem has been solved.

The version you use does not support png, so:

albert
  • 8,285
  • 3
  • 19
  • 32
  • Thank you, problem solved! I changed `DOT_IMAGE_FORMAT = ` form `png` to `svg`, then everything works just fine. And for HTML if the browser is IE +9, you need to set `HTML_FILE_EXTENSION` to `xhtml`. – Shiqi He Dec 22 '19 at 19:00