使用 doxygen 在文档中引用结构成员不起作用;结构成员未出现在文档中

Referencing struct member in documentation using doxygen not working; struct member not appearing in documentation

运行 吸氧

namespace BV
{
namespace Data
{
typedef struct Station {
    uint offsetId;              //! The ID of a station is generated by adding an offset to a base (example: 1000)
    uint id;                    //! The ID of the station (see {@link Station.offsetId} for more details)
    QString name;               //! Name of the station
    QStringList lineSwitches;   //! A list of available lines the passanger can switch to from the station
} Station;


...
}
}

returns警告

/home/USER/Projects/HelloWorld/src/csvparser.h:16: warning: unable to resolve link to `Station.offsetId' for \link command

最初我只有 offsetId 而不是 Station.offsetId 但在网上查看后我看到了一堆示例(包括此处的 SO),这些示例描述了这种方式。此外,我还想在我的 header.

的其他部分引用该成员

我不仅收到上面的警告,而且我刚刚查看了为我的结构生成的 HTML 文档,令我惊讶的是它甚至不存在:

Public Attributes

uint id

The ID of a station is generated by adding an offset to a base (example: 1000)

QString name

The ID of the station (see **Station.offsetId** for more details) 

QStringList lineSwitches

Name of the station. 

Station.offsetId只是一个坏掉的link.

问题中所述的文档使用 //! 作为注释字符串,这是为了在成员之前使用。在成员之后拥有文档时,应该使用 //!<。另请参阅 doxygen 手册中的 "Putting documentation after members"。

作为第二部分没有必要使用:{@link Station.offsetId}(实际上 \link 也应该有一个 \endlink。更好的是使用 \ref# 例如 \ref Station.offsetId#offsetId\ref offsetId 或在(这种情况下)只是 Station.offsetId.