我正在使用Sphinx编写一个项目文档,在哪里获取Doxygen XML output,我使用了呼吸。我在.rst文件中使用了files指令。
sample.cpp
namespace X{
class A{
public:
int x;
};
}在我的rst文件中我刚刚添加了
.. doxygenclass:: X::A
:members:
:protected-members:
:private-members:在构建项目之后,我可以看到class A的详细文档。出于某种原因,我打算使用markdown文件而不是.rst。
我已经过了几个职位,但没有找到任何有成效的答案。这是我买到的最好的这个StackOverflow的答案。
conf.py修改extensions = ["myst_parser",]编写一个.md文件如下所示:
# sample_md
```{doxygenclass:: X::A}*成员:
*受保护-成员:
*私人成员:
但在错误消息为
WARNING: unknown directive or role name: doxygenclass::A
/net/users/Linux_Home/user_name/project_name/doc/md_files/sample_mark.md:5: WARNING: Unknown directive type "doxygenclass::A".也试过
# sample_md
```{doxygenclass}一个
*成员:
*受保护-成员:
*私人成员:
也失败了,错误消息
Exception occurred:
File "/net/users/Linux_Home/user_name/.local/lib/python3.8/site-packages/myst_parser/docutils_renderer.py", line 973, in run_directive
if issubclass(directive_class, Include):
TypeError: issubclass() arg 1 must be a class
The full traceback has been saved in /tmp/sphinx-err-guubfd6h.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make[2]: *** [doc/CMakeFiles/Sphinx.dir/build.make:63: doc/sphinx/index.html] Error 2
make[1]: *** [CMakeFiles/Makefile2:215: doc/CMakeFiles/Sphinx.dir/all] Error 2
make: *** [Makefile:130: all] Error 2现在不知道该怎么做。
我在.md文件中使用了下面的代码片段
```{cpp:class} X::A它显示了类的呈现,但仅显示了一个可单击链接的名称,其中没有任何Doxygen文档。我需要那个信息。
我的一些纪念活动是:
现在我想知道,是否可以在breathe Doxygen directive文件中添加.md?如果是的话,我在哪里把语法搞错了?
发布于 2021-12-10 11:43:11
发布于 2021-12-09 18:17:44
你能试试这个吗?
```{doxygenclass} X::A*成员:
*受保护-成员:
*私人成员:
如果失败了,报告错误?
https://stackoverflow.com/questions/70293037
复制相似问题