xml - 使用 Breathe、Exhale 和 Doxygen 构建 Sphinx 文档会导致 XML 错误
问题描述
我正在尝试为我的 C++/Python 库设置文档,并希望使用 Sphinx 并阅读文档来执行此操作。因为库的大部分将用 C++ 编写,所以我必须使用 Breathe 和 Doxygen 之类的东西来访问提供的 C++ 文档字符串。
在我的计算机上make html
构建文档 (
breathe.parser.ParserError:
file /home/docs <a load of directories> /doxygenoutput/xml/classndarray_1_1basic__extent.xml:
not well-formed (invalid token): line 13, column 33
我检查了被投诉的文件,第 13 行甚至没有 33 列,所以我唯一的假设是构建过程正在做一些不同的事情。
对此问题的任何帮助将不胜感激。
如果有帮助,以下是我正在使用的软件版本:
Sphinx: 3.4.3
breathe: 4.30.0
exhale: 0.2.3
doxygen: 1.9.1 <== (EDIT -- installed version 1.8.13, which is the version on RTD)
============ 编辑 =============
classndarray_1_1basic__extent.xml
这是doxygen 生成的文件的前 40 行。看起来这个版本的 doxygen 不喜欢模板函数?
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.13">
<compounddef id="classndarray_1_1basic__extent" kind="class" language="C++" prot="public">
<compoundname>ndarray::basic_extent</compoundname>
<templateparamlist>
<param>
<type>typename</type>
<declname>T</declname>
<defname>T</defname>
</param>
<param>
<type>typename</type>
<declname>std::enable_if< std::is_integral< T >::value, int >::type</declname> <<<<<<<< This is line 13
<defname>std::enable_if< std::is_integral< T >::value, int >::type</defname>
<defval>0</defval>
</param>
</templateparamlist>
<sectiondef kind="private-attrib">
<memberdef kind="variable" id="classndarray_1_1basic__extent_1a4e3d7dc85fd368dfcc46750ca908322f" prot="private" static="no" mutable="no">
<type>T</type>
<definition>T ndarray::basic_extent< T, type >::m_extent[50]</definition>
<argsstring>[50]</argsstring>
<name>m_extent</name>
<initializer>{}</initializer>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="project dir/ndarray/basic_extent.hpp" line="218" column="1" bodyfile="project dir/ndarray/basic_extent.hpp" bodystart="218" bodyend="-1"/>
</memberdef>
<memberdef kind="variable" id="classndarray_1_1basic__extent_1ab050b78051726f3bfedad2b793f49d24" prot="private" static="no" mutable="no">
<type>T</type>
<definition>T ndarray::basic_extent< T, type >::m_extent_alt[50]</definition>
<argsstring>[50]</argsstring>
<name>m_extent_alt</name>
<initializer>{}</initializer>
<briefdescription>
</briefdescription>
在第 13 行(如上所述)中,doxygen 似乎在抱怨<
模板化函数的 。
解决方案
推荐阅读
- android - Android生物识别命中FINGERPRINT_ERROR_LOCKOUT如何在不等待30秒的情况下重置
- html - CSS:之间不可移动的差距
和 . 我已经将标题的上边距设置为 0 - python - 展平 json 以获得 Pandas 中的多个列
- javascript - 为什么我的对象被声明但从未读取(在函数内)?
- shell - 直接执行shell脚本和通过管道执行的区别
- pandas - 如何更改 sns.distplot 中 x 轴和 y 轴的数据
- qt - Qml的DropArea什么不能用?
- popup - wx.DrawRectangle 上的 wxPython 弹出窗口/工具提示?
- sass - 如何修复 gulp watch 不看文件
- javascript - 如何解决这个 javascript switch 语句问题,switch 语句不起作用