Doxygen无法识别已记录的功能等

问题描述

我刚开始使用doxygen(1.9.0)。我在我的C项目中为几个函数以及typedefenum添加了我认为是正确的注释块。但是,当我运行doxygen dconfig时,结果HTML仅包含我的源代码,而没有任何文档。

这是我的文档示例。

/**
*   \enum grrRetValue
*   \brief Function return values.
*
*   Any function in the Grr API which returns an int returns one of these
*   values.
*/
enum grrRetValue {
    GRR_RET_OK = 0,//!< The function succeeded.
    GRR_RET_NOT_IMPLEMENTED,//!< The requested functionality has not yet been implemented.
    GRR_RET_DONE,//!< A recursive task has finished.
    GRR_RET_NOT_FOUND,//!< The requested item was not found.
    GRR_RET_OUT_OF_MEMORY,//!< Memory allocation failure.
    GRR_RET_BAD_DATA,//!< Invalid data was passed to the function.
    GRR_RET_FILE_ACCESS,//!< A file read/write Failed.
    GRR_RET_OVERFLOW,//!< A buffer overflow occurred.
    GRR_RET_EXEC,//!< A call to exec Failed.
    GRR_RET_OTHER,//!< A generic error occurred which is not covered by the above options.
};

/**
*   \typedef grrNfa
*   \brief An opaque reference to Grr's regex object.
*/
typedef struct grrNfaStruct *grrNfa;

/**
*   \fn grrCompile
*   \brief Compiles a string into a regex object.
*   \param string The string to be compiled (does not have to be zero-terminated).
*   \param len The length of the string.
*   \param nfa A pointer to the Grr regex object to be populated.
*   \return GRR_RET_OK if successful and an error code otherwise.
*
*   Possible error codes:
*       - GRR_RET_OUT_OF_MEMORY
*       - GRR_RET_BAD_DATA (the string contained non-printable characters)
*/
int grrCompile(const char *string,size_t len,grrNfa *nfa);

让我知道您是否需要查看dconfig中的任何选项。

解决方法

这些症状看起来非常像缺少的\file命令。在文件的开头(例如/** \file */)放一个强力注释,然后重试。