gpt4 book ai didi

c - 头文件中没有定义的 Doxygen C 结构声明

转载 作者:太空宇宙 更新时间:2023-11-04 04:23:26 27 4
gpt4 key购买 nike

是否可以在 Doxygen 中添加对已声明但未定义的结构的简要描述?例如,运行 doxygen <config file> (其中 <config file> 是具有默认参数的配置文件)在包含文件 mydefinition.h 的文件夹中

#ifndef MYDEFINITION_H_
#define MYDEFINITION_H_

/** My super secret structure you can't access fields */
struct MyStructure;

/** The function that lets you use any instance of 'struct MyStructure'
* @param msobj the object
*/
void functionUsingMyStructure(struct MyStructure* msobj);

将生成函数的文档,但不会结构的文档。

我试图通过设置 OPTIMIZE_OUTPUT_FOR_C = YES 来修改 Doxygen 的配置文件但这并没有改变这种情况。

最佳答案

Doxygen 忽略结构的前向声明。要解决此问题,您必须明确声明给定的注释 block 描述了您的结构。

/** @struct MyStructure
* My super secret structure you can't access fields
*/
struct MyStructure;

关于c - 头文件中没有定义的 Doxygen C 结构声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43962185/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com