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!
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:
svg
as DOT_IMAGE_FORMAT
. (see documentation in e.g. http://doxygen.nl/manual/customize.html#minor_tweaks_dynsection)