我正在使用doxygen为我的C代码进行注释。我正在使用一个外部API(即不是我的), 该API的文档很少,因此我打算在自己的源文件中记录一些该API的信息。我确实拥有外部API的头文件,但将我的注释添加到该文件中并不实用。
外部头文件
struct foreignstruct
{
int a;
int b;
};
我的标题
/** My structure comments... */
struct mystruct
{
/** Describe field here... */
int field;
};
/** @struct foreignstruct
* @brief This structure blah blah blah...
* @??? a Member 'a' contains...
* @??? b Member 'b' contains...
*/
我应该使用什么标签来代替@???
以获得正确的Doxygen输出(其中“正确”表示生成的mystruct
和foreignstruct
的输出相同)?
foreignstruct
在被 doxygen 解析的文件中,那么此解决方案就可行。如果该文件未被 doxygen 所知,您认为它会起作用吗?当找不到 foreignstruct 的定义时(这是正确的,因为我不想让 doxygen 解析那个外部头文件),我看到warning: no uniquely matching class member found for foreignstruct::a
。我尝试添加头文件的路径(@struct foreignstruct /full/path/to/header.h
),但是我收到了警告信息:warning: the name
full/path/to/header.h' supplied as the argument of the \class, \struct, \union, or \include command is not an input file`。 - Ben