gpt4 book ai didi

html - 使用带有手动标记文件的 Doxygen 生成外部、在线、文档的链接

转载 作者:数据小太阳 更新时间:2023-10-29 02:29:12 28 4
gpt4 key购买 nike

我写了一个库,它使用另一个第 3 方库。该第 3 方库在特定网站上在线提供。我已经成功地使用 DoxyGen 来记录我的项目,但是我很难让它生成指向第 3 方、在线、文档的链接。

我发现我可以在我的文件中为这些类创建“虚拟”条目,并为它们生成页面,这些页面有一个指向在线文档的链接。这样做的缺点是,我被迫在我的文档上有一个页面,它只是一个链接。理想情况下,单击第 3 方类应将用户直接带到在线文档,而不是让用户通过“只做链接”页面。

我试图为此使用外部标记文件,但在 doxygen 运行时不断出现错误,并且标记的类在输出中仍然是非链接。我还没有找到任何使用手动创建的标记文件来引用在线文档的示例,但是根据 doxygen 说明的措辞,这似乎应该是可行的。我当前的标记文件目前看起来像这样(虽然我已经尝试了很多变体):外部标签.xml

<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<tagfile>
<compound kind="class">
<name>Vector3</name>
<filename>Vector3.html</filename>
</compound>
</tagfile>

我的配置文件包含以下行(也尝试了很多变体):

TAGFILES               = "externalTags.xml = http://docs.unity3d.com/ScriptReference/"

当标记文件从配置中移除时,doxygen 运行时没有任何错误。在包含标记文件选项的情况下,doxygen 总是会生成以下错误:

lookup cache used 941/65536 hits=6682 misses=1048
finished...
error: Fatal error at line 1 column 1: error while parsing element
error: Fatal error at line 1 column 1: error while parsing prolog

如何解决这些错误,并在 doxygen 输出中正确生成链接?

最佳答案

终于弄明白了:看来,我丢失了部分标记文件内容(命名空间部分)。
使用以下标记文件内容时,我没有收到任何错误,标记文件中指定的 Unity 类型的链接正确显示在输出中。

另外,请注意文件名字段不包含 .html 扩展名。

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<tagfile>
<compound kind="namespace">
<name>UnityEngine</name>
<filename></filename>
<class kind="class">UnityEngine::PlayerPrefs</class>
<class kind="class">UnityEngine::Vector3</class>
</compound>
<compound kind="class">
<name>UnityEngine::PlayerPrefs</name>
<filename>PlayerPrefs</filename>
</compound>
<compound kind="class">
<name>UnityEngine::Vector3</name>
<filename>Vector3</filename>
</compound>
</tagfile>

可能与问题无关,但还没有测试改回来,我重命名了标记文件:unity3d-doxygen-web.tag.xml

关于html - 使用带有手动标记文件的 Doxygen 生成外部、在线、文档的链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35923954/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com