gpt4 book ai didi

c++ - 在 Windows 上编译 qml-material 时出错

转载 作者:行者123 更新时间:2023-11-30 03:44:26 26 4
gpt4 key购买 nike

如何编译和安装qml-material在 windows7 机器上?

首先,我像下面这样克隆和编译 extra-cmake-modules:

git clone git://anongit.kde.org/extra-cmake-modules
cd extra-cmake-modules
mkdir build
cd build
cmake -G "MinGW Makefiles" ..

之后我运行了 Make 命令但是没有输出!(没有错误也没有变化!)

为了编译 qml-material,我使用以下指令:

mkdir build
cd build
cmake -G "MinGW Makefiles" ..

但我得到错误:

 -- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/gcc.exe
-- Check for working C compiler: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/g++.exe
-- Check for working CXX compiler: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at C:/Users/me/Documents/Github/ecm/ECMConfig.cmake:35 (include):
include could not find load file:

C:/Users/me/share/ECM/modules//ECMUseFindModules.cmake
Call Stack (most recent call first):
CMakeLists.txt:13 (find_package)

CMake Error at CMakeLists.txt:16 (include):
include could not find load file:

KDEInstallDirs

CMake Error at CMakeLists.txt:17 (include):
include could not find load file:

KDECMakeSettings

CMake Error at CMakeLists.txt:18 (include):
include could not find load file:

KDECompilerSettings

CMake Error at tests/CMakeLists.txt:1 (include):
include could not find load file:

ECMMarkAsTest

CMake Error at tests/CMakeLists.txt:13 (ecm_mark_as_test):
Unknown CMake command "ecm_mark_as_test".


-- Configuring incomplete, errors occurred!

我尝试使用 QtCreator 编译 ECM 之后,qml-material、ECM 编译和构建正常,没有任何错误,但 qml-material 也显示上面的错误!!!

谢谢,

最佳答案

我将提供我的评论作为更好概述的答案:

使用qml-material确实没有必要用 cmake 来“构建”项目,因为项目本身只包含普通的 qml 文件。我不知道为什么这些家伙从 qmake 切换到 cmake 系统。

然而,您只需将文件结构复制到本地文件系统即可:

  • 使用git clone https://github.com/papyros/qml-material.git

    checkout 项目
  • qml-material/modules/Material的内容复制到Qt5.5.1/5.5/mingw/qml/Materialqml-material/modules/QtQuick/Controls/Styles/MaterialQt5.5.1/5.5/mingw/qml/QtQuick/Controls/Styles/Material 其中 mingw 代表你的 Qt 平台。也可以是 gcc4.9 或类似的东西。

就这些。

关于c++ - 在 Windows 上编译 qml-material 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35485532/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com