0

i use doxygen 1.8.15 for the first time. I generate Doxyfile by doxygen -g and try to create documentation just by doxygen.

Among other i have in the base directory test.cpp looking like this:

/**
 * This is a test. doc for an enum
 */
enum Test {
        /**
         * doc for an item
         */
        SomeItem
};

I expect the html output in html/index.html but this is essentially an empty site. The following is an extract of the output:

Parsing files
Preprocessing /home/ernst/Ankrit/Software/Products/Recon/recon/Mbed/main.cpp...
Parsing file /home/ernst/Ankrit/Software/Products/Recon/recon/Mbed/main.cpp...
Reading /home/ernst/Ankrit/Software/Products/Recon/recon/Mbed/mbed_settings.py...
Parsing file /home/ernst/Ankrit/Software/Products/Recon/recon/Mbed/mbed_settings.py...
Preprocessing /home/ernst/Ankrit/Software/Products/Recon/recon/Mbed/test.cpp...
Parsing file /home/ernst/Ankrit/Software/Products/Recon/recon/Mbed/test.cpp...
Building group list...

As you can see test.cpp is inside. But in the results nothing on cpp shows up, only mbed_settings. What did i do wrong?

1 Answer 1

1

When e.g. cpp code doxygen has the "habit" of not finding some information when no corresponding .h file is present.

With the aid of the \file command this problem can be overcome, so the code:

/// \file

/**
 * This is a test. doc for an enum
 */
enum Test {
        /**
         * doc for an item
         */
        SomeItem
};

gives the requested result.

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

4 Comments

wow great.... but there seems no hint in the docs http://www.doxygen.nl/, or did i oversee??
No probably you didn't oversee it, unfortunately one of the hidden gems.
Not so hidden. It is mentioned here doxygen.nl/manual/docblocks.html#structuralcommands (check the "attention" section) and in the FAQ (doxygen.nl/manual/faq.html, second and third questions)
Apparently I don't know all the gems of doxygen either.

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.