Doxygen警告:忽略未知标签

时间:2017-08-17 19:46:03

标签: c++ c++11 documentation doxygen documentation-generation

使用Doxygen生成文档。获取"警告:忽略未知标签"错误,我不明白为什么。

最小,完整且可验证的示例:

/** This is a test */
#include <iostream>

/** \fn foo */
int foo() {
    return 0;
}

int main() {   
    std::cout << "hello world" << std::endl;
    return 0;
}

错误:

[53]: doxygen .\myTest.cpp
Warning: ignoring unknown tag `This' at line 1, file .\myTest.cpp
Warning: ignoring unknown tag `is' at line 1, file .\myTest.cpp
Warning: ignoring unknown tag `a' at line 1, file .\myTest.cpp
Warning: ignoring unknown tag `test' at line 1, file .\myTest.cpp
Warning: ignoring unknown tag `fn' at line 4, file .\myTest.cpp
Warning: ignoring unknown tag `foo' at line 4, file .\myTest.cpp
Warning: ignoring unknown tag `int' at line 5, file .\myTest.cpp
Warning: ignoring unknown tag `foo' at line 5, file .\myTest.cpp
Warning: ignoring unknown tag `return' at line 6, file .\myTest.cpp
Warning: ignoring unknown tag `0' at line 6, file .\myTest.cpp
Warning: ignoring unknown tag `int' at line 9, file .\myTest.cpp
Warning: ignoring unknown tag `main' at line 9, file .\myTest.cpp
Warning: ignoring unknown tag `std' at line 10, file .\myTest.cpp
Warning: ignoring unknown tag `cout' at line 10, file .\myTest.cpp
Warning: ignoring unknown tag `hello' at line 10, file .\myTest.cpp
Warning: ignoring unknown tag `world' at line 10, file .\myTest.cpp
Warning: ignoring unknown tag `std' at line 10, file .\myTest.cpp
Warning: ignoring unknown tag `endl' at line 10, file .\myTest.cpp
Warning: ignoring unknown tag `return' at line 11, file .\myTest.cpp
Warning: ignoring unknown tag `0' at line 11, file .\myTest.cpp
Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for files to exclude
Searching for files to process...
...other stuff...

Thx,此致,Keith:^)

1 个答案:

答案 0 :(得分:3)

您将文件传递给doxygen,就好像它是配置文件一样,而不是cpp。这就是为什么它会在每个单词上给你一个错误。

  

要生成文档,您现在可以输入:

     

doxygen <config-file>

请参阅http://www.doxygen.nl/manual/starting.html#step2

相反,请在源旁边生成配置文件:

doxygen -g myconfig.conf

然后运行doxygen:

doxygen myconfig.conf

由于默认值为INPUT =,默认情况下会从当前目录中的文件构建文档。