Doxygen不会生成功能文档

时间:2013-12-30 15:23:37

标签: c doxygen documentation-generation doxygen-wizard

我第一次尝试使用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);

1 个答案:

答案 0 :(得分:9)

文档明确指出,只有在您的功能声明之前没有发表评论时才需要\fn

  

如果您的评论栏位于功能声明或   定义此命令可以(并避免冗余)   删去。

因此,只需移除整个\fn行,它就可以正常工作。

<强>更新

顺便说一句,\file shouldn't have a filename after it

  

如果省略文件名(即\ file留空后的行)   然后包含\ file命令的文档块将   属于它所在的文件。

如果您指定了文件名,则必须手动更新文件名,如果文件名发生变化(此发生),您可能会忘记这样做。不指定文件名更容易,并且始终是最新的。