相对于 doxygen 的 QHG_LOCATION 路径是什么?

What is the QHG_LOCATION path relative to for doxygen?

当我将QHG_LOCATION设置为绝对路径时,我可以在html和qch中创建有效的doxygen文档。如果我将 qhelpgenerator 及其 DLL 放入当前目录 ./ 并设置 QHG_LOCATION=qhelpgenerator,它也可以工作。但我不知道如何将 qhelpgenerator 放入子目录 qt/bin/qhelpgenerator 并让 doxygen 找到它。它总是说

error: failed to run qhelpgenerator on index.qhp

这意味着它找不到 qhelpgenerator。

那么问题来了:如果我要QHG_LOCATION是一个相对路径,相对于什么目录呢?它既不相对于 ./ 也不相对于 html 输出目录。

确实,QHG_LOCATIONQCH_FILE 都必须相对于 HTML 输出目录。此外,您必须使用反斜杠 \ 作为 Windows 上的目录分隔符。 doxyfile 的其余部分支持正斜杠,但此处不支持。

我觉得这两个问题都很烦人,但事实就是这样。

感谢艾伯特的宝贵意见!

可以通过输出执行的外部命令来调试问题: doxygen -d extcmd 并在 doxygen 之外执行给定的命令 'by hand'。

来自 QHG_LOCATION 的文档:

The QHG_LOCATION tag can be used to specify the location of Qt's qhelpgenerator. If nonempty doxygen will try to run qhelpgenerator on the generated .qhp file.

以及 QCH_FILE 的文档:

If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify the file name of the resulting .qch file. The path specified is relative to the HTML output folder.