2

I would like to generate documentation for C++ files with doxygen. Everything is good when all the *.h and *.cpp files are stored in one folder. Then I type

doxygen -g doxygenfile

and then

doxygen doxygenfile

After all this I have a latex folder and an html folder. Everything is good. The problem is when these files *.h *.cpp are stored in different locations, e.g.: *.h in H folder *.cpp in CPP folder and so on. Could somebody tell me how to generate the documentation in this case?

1 Answer 1

4

If you want a GUI to tweak how Doxygen works you can use doxywizard and open the generate Doxyfile.

In order to make doxygen look into the subdirectories you can change in the Doxyfile this line

RECURSIVE              =

with

RECURSIVE              = YES

Edit: As bornruffians pointed out, Doxygen looks for the source files in the directories specified in the INPUT setting (always in the Doxyfile). So you can specify each directory in the INPUT tag by writing something like

INPUT = "src/CPP" "src/H"

and turn off the RECURSIVE tag. You can also put single files as values for the INPUT tag.

Sign up to request clarification or add additional context in comments.

2 Comments

If you want to select specific directories to recurse, use the INPUT tag in the Doxyfile. Alternatively, you could put every folder in the INPUT tag and turn RECURSIVE off; that's just tedious when you have a lot of folders.
Use of INPUT with a list of files is indeed tedious but can be necessary if you want contents in a particular order in the document.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.