خطای پیدا نشدن Qt - هفت خط کد انجمن پرسش و پاسخ برنامه نویسی

خطای پیدا نشدن Qt

0 امتیاز

سلام.

من در حال make کردن کتابخانه ای هستم که به Qt نیاز داره مسیر Qt رو هم به camke GUI میدم ولی خطای زیر را میده راه حلی دارید؟

CMake Warning at cmake/Modules/FindQtX.cmake:15 (FIND_PACKAGE):
  By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5Widgets", but CMake did not find one.

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

    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake

  Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
  "Qt5Widgets_DIR" to a directory containing one of the above files.  If
  "Qt5Widgets" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (FIND_PACKAGE)


CMake Warning at cmake/Modules/FindQtX.cmake:16 (FIND_PACKAGE):
  By not providing "FindQt5Xml.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Xml", but
  CMake did not find one.

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

    Qt5XmlConfig.cmake
    qt5xml-config.cmake

  Add the installation prefix of "Qt5Xml" to CMAKE_PREFIX_PATH or set
  "Qt5Xml_DIR" to a directory containing one of the above files.  If "Qt5Xml"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (FIND_PACKAGE)


CMake Warning at cmake/Modules/FindQtX.cmake:17 (FIND_PACKAGE):
  By not providing "FindQt5XmlPatterns.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5XmlPatterns", but CMake did not find one.

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

    Qt5XmlPatternsConfig.cmake
    qt5xmlpatterns-config.cmake

  Add the installation prefix of "Qt5XmlPatterns" to CMAKE_PREFIX_PATH or set
  "Qt5XmlPatterns_DIR" to a directory containing one of the above files.  If
  "Qt5XmlPatterns" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (FIND_PACKAGE)


CMake Warning at cmake/Modules/FindQtX.cmake:18 (FIND_PACKAGE):
  By not providing "FindQt5PrintSupport.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5PrintSupport", but CMake did not find one.

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

    Qt5PrintSupportConfig.cmake
    qt5printsupport-config.cmake

  Add the installation prefix of "Qt5PrintSupport" to CMAKE_PREFIX_PATH or
  set "Qt5PrintSupport_DIR" to a directory containing one of the above files.
  If "Qt5PrintSupport" provides a separate development package or SDK, be
  sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (FIND_PACKAGE)


CMake Warning at cmake/Modules/FindQtX.cmake:19 (FIND_PACKAGE):
  By not providing "FindQt5OpenGL.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5OpenGL", but CMake did not find one.

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

    Qt5OpenGLConfig.cmake
    qt5opengl-config.cmake

  Add the installation prefix of "Qt5OpenGL" to CMAKE_PREFIX_PATH or set
  "Qt5OpenGL_DIR" to a directory containing one of the above files.  If
  "Qt5OpenGL" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (FIND_PACKAGE)


CMake Warning at cmake/Modules/FindQtX.cmake:20 (FIND_PACKAGE):
  By not providing "FindQt5Network.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5Network", but CMake did not find one.

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

    Qt5NetworkConfig.cmake
    qt5network-config.cmake

  Add the installation prefix of "Qt5Network" to CMAKE_PREFIX_PATH or set
  "Qt5Network_DIR" to a directory containing one of the above files.  If
  "Qt5Network" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (FIND_PACKAGE)


Qt 5 required components or the CMake modules to locate them have not been found.
Falling back to Qt 4.
CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindQt4.cmake:1314 (message):
  Found unsuitable Qt version "5.12.12" from
  E:/Qt/Qt5.12.12/5.12.12/msvc2017_64/bin/qmake.exe, this code requires Qt
  4.x
Call Stack (most recent call first):
  cmake/Modules/FindQtX.cmake:157 (FIND_PACKAGE)
  CMakeLists.txt:68 (FIND_PACKAGE)

 

سوال شده مرداد 3, 1402  بوسیله ی Lori3 (امتیاز 857)   11 36 105

1 پاسخ

+1 امتیاز
 
بهترین پاسخ

environment را به صورت زیر مقداردهی کنید.

SET(CMAKE_PREFIX_PATH "E:/Qt/Qt5.12.12/5.12.12/msvc2017_64/")

 

پاسخ داده شده مرداد 3, 1402 بوسیله ی عباس مولایی (امتیاز 2,754)   1 5 13
انتخاب شد شهریور 8, 1402 بوسیله ی farnoosh
...