Szabolcs
Szabolcs

Reputation: 25703

Doxygen won't resolve reference to typedef in namespace

Doxygen works fine with the following short example:

/** \file */

/// This is an integer
typedef int myInteger;

/// This is the same as \ref myInteger
typedef myInteger myOtherInteger;

enter image description here

But it won't resolve the reference to myInteger if I put it into a namespace.

/** \file */

namespace bar {

/// This is an integer
typedef int myInteger;

/// This is the same as \ref myInteger
typedef myInteger myOtherInteger;

}

enter image description here

Notice that neither of the two mentions of myInteger are links now. It also complains:

warning: unable to resolve reference to `myInteger' for \ref command

Writing \ref bar::myInteger does not help.

How can I fix this?

I have doxygen 1.8.13.

Upvotes: 3

Views: 5237

Answers (1)

albert
albert

Reputation: 9012

To see the documentation properly there are some possibilities:

  • document the namespace
  • set EXTRACT_ALL to YES

negative aspect is that the namespace is shown as extra tab in the documentation. this can be overcome by modifying the used layout file:

  • doxygen -l [layoutFileName.xml]
  • modify generated file (set parts about namespace to visible="no")
  • reference file in Doxyfile

Upvotes: 6

Related Questions