4
votes

I'm generating developer documentation using Doxygen. It's parsing all of the files correctly, but the output is generating duplicate entries in the member function list and class diagram.

Any ideas?

enter image description here

1
Been a while since I used Doxygen. Can you post launch options, if any? - Compass
I'm using 'doxygen Spectr' to kick it off where Spectr is the name of the Doxygen file. I'm using all of the default values in the Doxygen Config file with the exception of setting Recursive = YES. - Matt Zimmermann

1 Answers

0
votes

I had this exact problem, and found that I had accidentally specified a build folder in the INPUT line due to RECURSIVE being on, e.g.,

Example file structure:

./
  MyLibrarySources/
  Libs/
  build/

Doxyfile:

INPUT     = ./ MyLibrarySources/ ...
RECURSIVE = YES

This caused Doxygen to parse the headers from two different locations: once from MyLibrarySources/, and once from build/, producing duplicate members and other odd results.

The easy solution is to add your build directory to the EXCLUDE line, e.g.:

EXCLUDE   = "build"

This makes Doxygen not parse the same header files in two different locations. And yes, in-source build directories are usually a bad idea, place them elsewhere. In my case, command-line builds not issued from my IDE went there by default.

Edit note: I had incorrectly believed that the source files were being parsed twice because of the double-specification in the INPUT line. This is not the case. Doxygen is smart about this and will not parse the same physical file twice 👍.