在窗口上编译 qml 材料时出错
Error on compile qml-material on windows
如何在Windows7机器上编译和安装qml材料?
首先,我克隆并编译额外的 cmake 模块,如下所示:
git clone git://anongit.kde.org/extra-cmake-modules
cd extra-cmake-modules
mkdir build
cd build
cmake -G "MinGW Makefiles" ..
之后,我运行Make
命令,但没有输出!(没有错误,没有变化!
为了编译 qml 材料,我使用以下指令:
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 材料、ECM 编译和构建正常,没有任何错误,但 qml 材料也显示上述错误!!
谢谢
我将提供我的评论作为更好地概述的答案:
要使用 qml-material,实际上没有必要使用 cmake "构建"项目,因为项目本身只包含纯 qml 文件。我不知道为什么这些家伙从 qmake 切换到 cmake 系统。
但是,您需要做的就是简单地将文件结构复制到本地文件系统:
-
使用
git clone https://github.com/papyros/qml-material.git
签出项目 -
将
qml-material/modules/Material
的内容复制到Qt5.5.1/5.5/mingw/qml/Material
,qml-material/modules/QtQuick/Controls/Styles/Material
Qt5.5.1/5.5/mingw/qml/QtQuick/Controls/Styles/Material
mingw
代表您的Qt平台。也可能是gcc4.9
或类似的东西。
就这样。
相关文章:
- 访问者访问变体并返回不同类型时出错
- 在Linux for Windows上编译C++代码时出错
- 读取文件的最后一行并输入到链接列表时出错
- 重载操作程序时出错>>用于类中的字符串 memebr
- 调用专用模板时出错"no matching function for call to [...]"
- C++-试图将函数指针推回到另一个CPP文件中的矢量时出错
- LINK 尝试使用 OpenSSL evp aes 256 c++ 时出错
- 在Google Kick start中提交时出错
- 在c++中访问int到类对象的映射时出错
- 分段错误当我试图运行程序时出错
- 使用dynamic_cast和构造函数时出错
- CHECK(调用)函数在Google Colab中出错
- 用pybind11包装C++抽象类时出错
- 为x86而非x64编译时出错
- 从R调用C++函数并对其进行集成时出错
- 这个函数哪里出错了
- C++ 创建包含链表和字符串的对象的链接列表时出错
- 为重写std::exception的库生成swig接口时出错
- 导入/导出变量时出错
- 在窗口上编译 qml 材料时出错