Doxygen 不生成任何文档

Doxygen doesn't generate any documentation

没有为我的 C 存储库的任何函数生成文档

我的配置:

# Difference with default Doxyfile 1.9.1
PROJECT_NAME           = WLib
OUTPUT_DIRECTORY       = doxy
OPTIMIZE_OUTPUT_FOR_C  = YES
EXTRACT_ALL            = YES
CASE_SENSE_NAMES       = NO
HIDE_SCOPE_NAMES       = YES
INPUT                  = .
FILE_PATTERNS          = *.c \
                         *.h
RECURSIVE              = YES

编辑代码:

/** \fn     Array Fill
 *  \param  sa  size of the array A in bytes
 *  \param  a   the array A
 *  \param  sb  size of the array B in bytes
 *  \param  b   the array B
 *  \brief  Takes two arrays and their sizes. Fills the array A with as many
 *          instances of array B as the size of array A can handle.
 *  \return The array A
 *  Method:
 *      -#  If /e a = NULL, then the array of size /e sa will be allocated
 *      -#  If /e b = NULL and /e sb = 0, then array will be filled with zeros
 *      -#  If /e sb = 0, the function does nothing and returns NULL
 *      -#  Declares a variable /e i, this is be the pointer offset
 *      -#  Assignes array /e b to array /e a offsetted by /e i, and incriments
 *          /e i by /e sb. This step is repeated until less than sb bytes are
 *          left untreated
 *      -#  Assignes the remaining part of array /e a with whatever piece of 
 *          array /e b fits
 */
VO* afl(register    const   U16 sa, 
        register            VO* a, 
        register            U8  sb, 
        register    const   VO* b   ) {
...
}

提供的代码在运行时直接给出答案,它给出警告:

warning: documented symbol 'Array Fill' was not declared or defined.

查看我们在此处看到的代码时:

\fn     Array Fill

但从文档中我们了解到:

\fn (function declaration)

Indicates that a comment block contains documentation for a function (either global or as a member of a class). This command is only needed if a comment block is not placed in front (or behind) the function declaration or definition.

If your comment block is in front of the function declaration or definition this command can (and to avoid redundancy should) be omitted.

A full function declaration including arguments should be specified after the \fn command on a single line, since the argument ends at the end of the line!

此外,在文档中的给定示例中:

  const char *member(char,int) throw(std::out_of_range);

/*! \fn const char *Fn_Test::member(char c,int n) 
 *  \brief A member function.
 *  \param c a character.
 *  \param n an integer.
 *  \exception std::out_of_range parameter is out of range.
 *  \return a character pointer.
 */

换句话说,\fn命令的语法在这种情况下应该是:

\fn     VO* afl(register const U16 sa, register VO* a, register U8 sb, register const VO* b)

注:

  1. \fn 命令通常用于当函数的文档不直接在函数的字体中时使用。在出现问题的情况下,不需要 \fn 命令。
  2. 看来这里的\fn是在\brief命令的上下文中使用的,而\brief命令是在\details命令的上下文中使用的。