c - Doxygen 组警告 : end of file inside a group

标签 c module grouping doxygen

我正在尝试在以 @{ 结尾的 C 头文件中使用 doxygen(v1.8.9.1) @defgroup 注释,如下所示:

/** @file foo.h
 * @brief This is a foo file
 */

#ifndef FOO_H_
#define FOO_H_

#include somebar.h

/** @defgroup foo Foo
 * @details This foo file does foo stuff
 * @{
 */

#ifdef __cpluplus
    extern "C" {
#endif

/* foo declarations here with standard doxygen documentation */

#ifdef __cpluplus
    }
#endif

/** @} */

#endif

这与 doxygen-Grouping-Modules 中的示例用法相匹配但是,当我构建它时,这会在文件末尾出现错误 warning: end of file while inside a group

然而,如果开头的 @{ 位于单独的 doxygen 注释中,则一切正常:

/** @defgroup foo Foo
 * @details This foo file does foo stuff
 */
/** @{ */

这是错误还是我做错了什么?

最佳答案

我一直在尝试两种不同的打开组的方式,我在非文档注释中留下了旧的组打开器,doxygen 显然仍然像文档注释一样对待。这意味着 doxygen 认为我打开了两个组,但只关闭了其中一个!

例如

/** @defgroup foo Foo
 * @details This foo file does foo stuff
 * @{
 */

/* @{ */ // Note, only a single leading star so should not be treated as doxygen comment, yet it is.

/* Some code and documentation that is in a group here. */

/**@} */ // Close one group here but the second, unasked-for, group is not closed yet.
/* EOF */

关于c - Doxygen 组警告 : end of file inside a group,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28479514/

相关文章:

使用 open() 创建文件但无权在 C 中修改它

c - 无法释放 C 中的所有内存

c - 如果第二个字符串在开头,strstr 会返回与第一个字符串相同的指针吗?

php - joomla 2.5 模块中的图像插入字段

python - 按时差算法对 Timelapses 进行分组

c - 函数返回一个指针

macros - Julia ·朗 : Change value of module level global at import time

python-3.x - 从同级目录导入 - Python 3.7

r - 确定所有组合但使用分组变量

python - Pandas 按 block 而不是单个值进行分组