c++ - Doxygen 似乎无法识别评论 (Doxywizard)

标签 c++ doxygen doxygen-wizard

我确定这是我做过的傻事,但我看不出它是什么:

所以我有一个 c++ 项目,它有一个 main.cpp 文件和一些类。它不是用 doxygen 编写的(错误 #1),但我希望纠正我的错误并生成一些文档。所以我安装了 doxygen 并运行了 doxygen GUI,输入了项目名称/概要并指定了源位置和目标位置。

另外,为了在函数上方获得一些输出,我按照 doxygen 规范要求的样式添加了注释:

//! My actual function doesn't really look like this
/*! 
 *  Some sample detail which isn't exactly the same as the main
 *  function but the structure is the same
 */
void sampleFunction()
{
    doSomethingUninteresting();
}

然而,当我在 doxywizard 中点击运行时,没有额外的评论。

如果我将提取模式设置为记录的实体,则只有 main.cpp 甚至不会显示。如果我将它设置为所有实体,则 main.cpp 出现在文件下并且函数在那里,但是文件中没有任何详细信息。

作为一个试图改造我的项目的完全新手,毫无疑问我遗漏了一些重要的事情,但我读过的所有文档/教程除了我所说的需要做的之外没有任何建议,所以我向知识渊博的 SO 社区寻求帮助

更新:

为了回应 Arne Mertz 的评论,这里有一些更多的细节:

  • Doxywizard 在 Program Files/doxygen/bin 中,配置文件在 doxywizard 默认创建它的地方

  • 我的源码在User/Desktop/

  • 输出文件夹在User/Desktop/Documentation

最佳答案

To document a global functions you have also to include a file name.例如

/*!
 * \file MyFileName.cpp
 * \brief a brief description of a file
 */

//! My actual function doesn't really look like this
/*! 
 *  Some sample detail which isn't exactly the same as the main
 *  function but the structure is the same
 */
void sampleFunction()
{
    doSomethingUninteresting();
}

请注意,\file 关键字后的名称应与文件名完全相同。

关于c++ - Doxygen 似乎无法识别评论 (Doxywizard),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25662208/

相关文章:

doxygen 不生成点的图像文件

c++ - 如何在 C++ 中使用制作/使用 Doxygen 过滤器?

c++ - 根据结构的元素对结构对象的 vector 进行排序 - C++

c++ - 函数 'glWindowPos2i' 无法解析?

xml - 更正 Doxygen XML 输出中的错误

c# - 为具有泛型集合的 C# 项目生成 Doxygen

c++ - C++中的输入错误检查

c++ - 组合问题 : operator '==' and operator '-'

c++ - 氧优化

doxygen - 删除 "File Members"