Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doxygen @link to a URL doesn't generate the link correctly

Tags:

I have added this to a class comment:

@link http://www.google.com Google @endlink 

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

Can anyone explain what is going wrong?

like image 257
David Doria Avatar asked Feb 01 '12 15:02

David Doria


1 Answers

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 

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.

Linking to URLs

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.

To manually specify link text, use the HTML 'a' tag:

<a href="linkURL">link text</a>  

For more information about how doxygen handles automatic linking see this documentation page.

like image 109
Chris Avatar answered Sep 19 '22 06:09

Chris