【发布时间】:2015-08-04 22:42:13
【问题描述】:
我正在尝试安装 CTK,但每次尝试时都会收到此错误:
[ 41%] Built target CTKWidgetsPlugins
Scanning dependencies of target CTKWidgetsCppTests
[ 41%] Building CXX object Libs/Widgets/Testing/Cpp/CMakeFiles/CTKWidgetsCppTests.dir/ctkSearchBoxTest1.cpp.o
/home/pedrojunior/Desktop/CTK/Libs/Widgets/Testing/Cpp/ctkSearchBoxTest1.cpp: In function ‘int ctkSearchBoxTest1(int, char**)’:
/home/pedrojunior/Desktop/CTK/Libs/Widgets/Testing/Cpp/ctkSearchBoxTest1.cpp:43:24: error: ‘QPalette::ColorRole’ is not a class or namespace
p.setColor(QPalette::ColorRole::Window, Qt::gray);
^
/home/pedrojunior/Desktop/CTK/Libs/Widgets/Testing/Cpp/ctkSearchBoxTest1.cpp:44:24: error: ‘QPalette::ColorRole’ is not a class or namespace
p.setColor(QPalette::ColorRole::Base, Qt::gray);
^
make[5]: *** [Libs/Widgets/Testing/Cpp/CMakeFiles/CTKWidgetsCppTests.dir/ctkSearchBoxTest1.cpp.o] Error 1
make[4]: *** [Libs/Widgets/Testing/Cpp/CMakeFiles/CTKWidgetsCppTests.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [CTK-prefix/src/CTK-stamp/CTK-build] Error 2
make[1]: *** [CMakeFiles/CTK.dir/all] Error 2
make: *** [all] Error 2
我使用的是 Linux Mint 17.1,并且我已经安装了 cmake 版本 2.8.12.2 和 Qt 版本 4.8。 有人知道我该如何解决这个错误吗?
【问题讨论】:
-
我刚刚检查了CTK out from git 并使用 Qt 4.7.1、CMake 3.0.2 和 GCC 4.8.2 成功构建了它。你的编译器版本是多少?
-
@m.s.该问题的修复程序已于 4 月 30 日 (github.com/commontk/CTK/pull/555) 进入源代码,您将获得修复程序,但 OP 的发行版尚未获取。