gpt4 book ai didi

c++ - 如何使用 cmake 构建 kate?

转载 作者:太空宇宙 更新时间:2023-11-04 12:47:38 27 4
gpt4 key购买 nike

亲爱的 stackoverflow 用户,

我正在尝试从源代码编译 kate,但我收到一个未声明变量的错误。到目前为止,这些是我正在使用的命令:

#! /bin/bash
cmake \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D CMAKE_INSTALL_PREFIX=~/kde/usr \
-D KDE_INSTALL_USE_QT_SYS_PATHS:BOOL=ON \
-D TARGET_include_directories:PATH="/usr/include/x86_64-linux-gnu/qt5/" \
-D Qt5_INCLUDE_DIRS:PATH="/usr/include/x86_64-linux-gnu/qt5/" \
-D Qt5_LIBRARY_DIRS:PATH="/usr/lib/x86_64-linux-gnu/qt5/" \
../kate/
make
make install

请在编译过程中找到下面的错误:我认为它必须与不包括一些应该在那里声明变量 QWidgetAction 的路径文件有关,但是我不确定为什么,因为我安装了所有必需的包网站。

(qtbase5-dev qtscript5-dev extra-cmake-modules plasma-framework-dev libkf5crash-dev libkf5config-dev libkf5activities-dev kinit-dev kdoctools-dev libkf5i18n-dev libkf5parts-dev libkf5guiaddons-dev libkf5iconthemes-dev libkf5jobwidgets-dev kio-dev libkf5texteditor-dev libkf5windowsystem-dev libkf5xmlgui-dev libgit2-dev)。我编译它的原因是因为我搞砸了我原来安装的 kate,我无法加载所有插件,因为我的/.config kate 文件夹不见了。请提供任何帮助。

[ 69%] Automatic moc for target katecloseexceptplugin [ 69%] Built target katecloseexceptplugin_automoc [ 71%] Built target katecloseexceptplugin [ 71%] Automatic moc for target katesqlplugin [ 71%] Built target katesqlplugin_automoc [ 71%] Building CXX object addons/katesql/CMakeFiles/katesqlplugin.dir
/katesqlview.cpp.o /home/pablo/kde/kate/addons/katesql/katesqlview.cpp: In member function ‘void KateSQLView::setupActions()’:
/home/pablo/kde/kate/addons/katesql/katesqlview.cpp:141:3: error:
‘QWidgetAction’ was not declared in this scope QWidgetAction *wa = new QWidgetAction(this); ^ /home/pablo/kde/kate/addons/katesql/katesqlview.cpp:141:18: error: ‘wa’ was not declared in this scope QWidgetAction *wa = new QWidgetAction(this);
^ /home/pablo/kde/kate/addons/katesql/katesqlview.cpp:141:27: error: expected type-specifier before ‘QWidgetAction’
QWidgetAction wa = new QWidgetAction(this);
^ addons/katesql/CMakeFiles/katesqlplugin.dir/build.make:96: recipe for target
'addons/katesql/CMakeFiles/katesqlplugin.dir/katesqlview.cpp.o' failed make[2]:
[addons/katesql/CMakeFiles/katesqlplugin.dir/katesqlview.cpp.o]
Error 1 CMakeFiles/Makefile2:2439: recipe for target 'addons/katesql/CMakeFiles /katesqlplugin.dir/all' failed
make[1]: *
[addons/katesql/CMakeFiles/katesqlplugin.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2

最佳答案

QWidgetAction 是 Qt 的一部分。您是否已在路径中正确获取 Qt 库和 header ?

标题:#include

关于c++ - 如何使用 cmake 构建 kate?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50610673/

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