我有一个 struct
,其字段之一用 gcc type attribute 注释.
struct str {
size_t size; /**< Size of string. */
char string[1] __attribute__ ((aligned(__BIGGEST_ALIGNMENT__))); /**< String. */
};
当我在此代码上运行 doxygen 时,结构成员string
不是作为数据字段
引用的,而是作为公共(public)成员函数
引用的。如何让 doxygen 将此字段列为数据字段
?
附注我的 Doxyfile
中存在字符串 OPTIMIZE_OUTPUT_FOR_C = YES
。
最佳答案
如果文档中的行是正确的
char string[1] __attribute__ ((aligned(__BIGGEST_ALIGNMENT__)));
可以
字符串[1];
在 doxygen 配置文件中定义就足够了:
预定义 = __attribute__((x))=
关于c - Doxygen 文档结构成员与属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54250761/