Qt Cmake 错误编译"GuiSupportQt not found"

Qt Cmake error compilation "GuiSupportQt not found"

本文关键字:GuiSupportQt found not 编译 Cmake 错误 Qt      更新时间:2023-10-16

我是Qt的新手,我已经遇到了问题,所以我开始为我的VTK项目创建一个简单的UI,首先,我测试了Qt在Qt 5.5.0中设计的示例项目UI,并在Cmake 3.10和VS2013中编译,用C++编程,在"配置完成"之前用Cmake编译后我有一行说"GuiSupportQt未找到"。 我忽略了它并生成了解决方案,然后我转到VS2013编译Cmake提供的解决方案,在VS2013中打开解决方案后没有找到我的项目,我只找到了名为ALL_BUILD和ZERO_CHECK的2个常见项目。

有关更多信息,我已经在一个非 Gui 项目(使用 vtk 渲染而没有 Qt 的 3d vtk 可视化)之前进行了编译,这是我自己的家庭作业项目,我得到了一个成功的结果,这意味着在我看来,当我编译一个使用 Qt 的项目时,问题就会出现考虑到我的 Qt-VTK 之前是用 Cmake 编译的,并且使用 VS2013 构建而没有任何错误。

这是我用来测试的Qt项目示例的代码: https://vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowUISingleInheritance

这是我尝试使用 Cmake 编译它时得到的:

The C compiler identification is MSVC 18.0.21005.1 The CXX compiler identification is MSVC 18.0.21005.1 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done VTK_VERSION: 7.1.1 GuiSupportQt not found. Configuring done Generating done

看了一会儿后,我发现了另一个棘手的解决方案来逃避问题,因为我的 Vtk 可视化部分工作正常并且我在 Windows 上工作,所以我只是使用 Qt gui 通过 cmd 中的命令发送参数,然后 Vtk 项目编译的 exe 文件将在执行中获取参数(iso 值,数据文件夹名称......ect) 在 argv[] 数组中,然后在新窗口中启动它,所以我不必使用 Cmake 编译 Qt 项目。