QDoc uses Clang when parsing C++ files as well as function signatures in \fn commands. Clang is part of the LLVM Compiler Infrastructure Project . If you're going to build QDoc from source, you must install Clang 15.0 or later.
You can get Clang through various channels:
注意: the prebuilt binaries from http://releases.llvm.org/download.html cannot be used, as they miss certain components required by QDoc.
If you install Clang in a custom location you need to tell CMake where to find it. This can be done by specifying your LLVM installation path using the
LLVM_INSTALL_DIR
environment variable when configuring Qt. Alternatively, you can add the installation path to the
CMAKE_PREFIX_PATH
CMake cache variable.