找不到Qt6安装?

Dug*_*gue 8 c++ qt cmake qt6

尝试按照 GitHub 页面的安装说明进行操作:https://github.com/TASEmulators/fceux

我安装了 Qt6,当我执行以下操作时,会发生以下情况:

mkdir build
cd build
cmake  -DCMAKE_INSTALL_PREFIX=/usr  -DQT6=1  -DCMAKE_BUILD_TYPE=Debug    ..

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- GUI Frontend: Qt6
CMake Error at src/CMakeLists.txt:22 (find_package):
  By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt6", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt6" with any of
  the following names:

    Qt6Config.cmake
    qt6-config.cmake

  Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
  to a directory containing one of the above files.  If "Qt6" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!

Run Code Online (Sandbox Code Playgroud)

小智 0

正如错误消息所示,您需要将环境值 Qt6_DIR 设置为安装 qt6 的位置。这应该是安装 qt6 的说明的一部分。

您应该链接用于安装 qt6 的说明。它们可能包含设置环境变量 QT_DIR 而不是您正在构建的内容所需的 Qt6_DIR 的指令。如果是这种情况,只需按照设置 QT_DIR 的说明来设置 Qt6_DIR。

  • 那么,如果它不是环境变量,它会去哪里?! (4认同)