Doxygen无法生成函数文档。

6

我第一次尝试使用doxygen。

我想用它来记录一些C库和结构体。

我认为我使用了正确的标签,但是文档只有在定义宏方面才算好,但函数标签(\fn)则完全被忽略了。 下面是我标记的注释示例:

`/*!    \file   cab.h`

    \author dan
    \date   20/12/2013
    \brief  cab

`*/
   /*! \def NOT_SPECIFIED`

     \brief Constant value that indicates the not specification of a parameter
  ` */`

   `#define NOT_SPECIFIED 0`

    /*! \fn         cab_create
     \brief     allocates the memory space and resources for the CAB
     \param     c cab to create
     \param     dim_buf size of the data contained in each buffer
     \param     maximum number of buffer
     \param     protocol used to handle priority inversion 
     \param     ceiling value of the ceiling,
     \return    1 if it completes successfully, -1 otherwise
    */`
    int cab_create(cab *c, int dim_buf, int max_buf, int protocol, int ceiling);

你能请把你的Doxyfile复制粘贴一下吗? - liberforce
1个回答

11

文档明确指出,\fn 仅在您的注释不是紧跟着函数声明之前时才需要。

如果您的注释块在函数声明或定义之前,则可以(并且为了避免冗余应该)省略此命令。

所以只需删除整个 \fn 行,然后它就可以运行。

更新:

顺便说一下,\file 后面不应该有文件名

如果省略文件名(即 \file 后面的行为空),则包含 \file 命令的文档块将属于其所在的文件。

如果您指定一个文件名,那么如果文件名更改,您将不得不手动更新它(这将发生),而且您可能会忘记这样做。不指定文件名更容易,并且始终是最新的。


注意:\file 后面没有文件名的空行甚至不能有任何 *,它必须完全为空白! - Michael

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接