2

I am making a library in C and writing internal documentation for it using Doxygen 1.9.4. I have a following header, included both from library source (in this case LIBRARY_SOURCE is defined) and from a program which is using my library:

/** @file
 *  File description... */

/** @brief Public function that is a part of an API */
void publicFunction();

#ifdef LIBRARY_SOURCE
    /** @brief Internal function that does things. */
    void internalFunction();
#endif

The problem is, Doxygen does not generate the documentation for internalFunction, but in the case ofpublicFunction everything is working as expected. Doxyfile's EXTRACT_ALL option does not help.

Why doesn't this work and how do I fix this? Thanks in advance.

2
  • 1
    Well, I couldn't find any way to do this, so I created public and private headers and it works as it should. Won't delete the question as this may help somebody Commented Jun 19, 2024 at 17:34
  • A bit late to the party, but in the original example where did you set the LIBRARY_SOURCE? In case in the Doxyfile did you also set MACRO_EXPANSION = YES? Commented Jul 15, 2024 at 16:56

2 Answers 2

1

It appears that you are not using the latest version Doxygen. If I go the Doxygen website and read the changelog, I see in version 1.10 the next line:

issue #10472: Symbols within a namespace after a heavily #ifdef class are omitted in HTML output

Could it be that this will resolve your problem?

I know that this is not a definite answer but I'm not able to post comments.

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

3 Comments

Thank you for an answer, but, unfortunately, the issue persists even on the latest release 1.11.0 (doxygen.nl/download.html)
I'm aware that chances are only minimal, but what if you change #ifdef in #if defined ?
Nothing changed, @LexWassenberg
0

How is LIBRARY_SOURCE defined? In the Doxygen configure file, you can set it via PREDEFINED:

PREDEFINED = LIBRARY_SOURCE

You can also check whether the documentation shows up if preprocessing is disabled (enabled by default):

ENABLE_PREPROCESSING = NO

Comments

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.