Doxygen @URL链接无法正确生成链接 [英] Doxygen @link to a URL doesn't generate the link correctly
问题描述
我已将此添加到班级注释中:
I have added this to a class comment:
@link http://www.google.com Google @endlink
但是,当我使用doxygen生成文档时,链接文本的确是 Google,但是链接将:
However, when I generate documentation using doxygen, the link text is indeed "Google", but the link is to:
file:///media/portable/Examples/Doxygen/link/html/classClass1.html
file:///media/portable/Examples/Doxygen/link/html/classClass1.html
有人可以解释出什么问题吗?
Can anyone explain what is going wrong?
推荐答案
我认为您使用的 clink
错误。从doxygen 文档, \link
用于引用诸如文件,类或成员之类的对象,并将对其中一个的引用作为其第一个参数。例如,如果我想在类 myClass
中引用类方法 func
,我会使用
I think you are using \link
incorrectly. From the doxygen documentation, \link
is used to refer to objects like a file, class or member and takes a reference to one of these as its first argument. For example, if I wanted to refer to a class method func
in the class myClass
, I would use
\link myClass::func link text ... \endlink
,其余所有参数都视为链接的文本。我认为您的问题是您没有将有效对象作为第一个参数传递。我猜想 classClass1
是文件中试图包含链接的下一个对象,这就是 \link $ c
with all of the remaining arguments considered to be text for a link. I think your problem is that you do not pass a valid object as the first argument. I would guess that classClass1
is the next object in the file where you tried to include the link and this is what the \link
command is refering to.
链接到URL
Doxygen将自动生成URL链接,因此无需在链接中使用 \link
和 \endlink
或任何其他内容其他命令。因此,请删除这些内容,看看是否可以解决问题。
Doxygen will generate URL links automatically, so there is no need to surround the link with \link
and \endlink
or any other commands. So remove those and see if that fixes the problem.
要手动指定链接文本,请使用HTML'a'标签:
To manually specify link text, use the HTML 'a' tag:
<a href="linkURL">link text</a>
有关doxygen如何处理自动链接的更多信息请参阅此文档页面。
For more information about how doxygen handles automatic linking see this documentation page.
这篇关于Doxygen @URL链接无法正确生成链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!