我正在尝试在以 @{
结尾的 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/