我确定这是我做过的傻事,但我看不出它是什么:
所以我有一个 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/