1

I am trying to write a standalone Doxygen file for my applicaiton as per the top recommendation in Best Tips for documenting code using doxygen?.

In my overview, I'm referencing class files, but the links don't show up.

file A.cs:

namespace NoAutoLinks
{
    public class A
    {
    }
    public class B
    {
        public A A { get; set; }
    }
}

file Doxygen.cs:

/// @file Doxygen.cs
/// @mainpage No Auto Links
/// I want to link to A and B here.  Even explicit @ref A and \ref B links don't show up here.

The main page is rendered, but there are no links to A or B. In the class page for B, the autolink to A does show up.

Doxyfile does contain AUTOLINK_SUPPORT = YES

I see several articles about turning off autolinking, but nothing about this particular condition of autolink failure.

Community
  • 1
  • 1
Denise Skidmore
  • 2,286
  • 22
  • 51
  • Note, if I create an anchor `@anchor C` in the class definition of B, and then put an explicit `@ref C` on mainpage, then that link does go to class B. But even explicit `@ref A` references to the class do not work. – Denise Skidmore Feb 26 '13 at 17:54
  • If I try to force the link with `@link B B @endlink` I get a link to index.html. http://stackoverflow.com/questions/9098680/doxygen-link-to-a-url-doesnt-generate-the-link-correctly suggests that this may be because B is an invalid link object – Denise Skidmore Feb 26 '13 at 23:03
  • Adding a public function to the class made no difference. (Shooting in the dark here.) – Denise Skidmore Feb 26 '13 at 23:07

2 Answers2

0

This is a namespace issue. The following works.

namespace NoAutoLinks
{
    /// @file Doxygen.cs
    /// @mainpage No Auto Links
    /// I want to link to A and B here.
}

Unfortunately, the example is simpler than the actual problem. In the actual problem there are two namespaces, and this solution only fixes one of them. Adding a using otherNamespace does not seem to help. Class documentation does not seem to have any trouble bridging namespaces.

Of course, once you know the answer it's easier to find references, but it doesn't look like anyone else has a solution for the second namespace either.

Additional answers that address the second namespace would be welcome.

Community
  • 1
  • 1
Denise Skidmore
  • 2,286
  • 22
  • 51
0

Explicit links including the namespace work:

@link Namespace.C C @endlink
Denise Skidmore
  • 2,286
  • 22
  • 51