[deepin-IDE] 编译deepin-unioncode失败
Tofloor
poster avatar
wlly-lzh
deepin
2024-09-18 15:58
Author

编译报错如下:

[ 88%] Building CXX object src/plugins/codegeex/CMakeFiles/codegeex.dir/widgets/inputeditwidget.cpp.o
cd /home/wlly-lzh/Work/deepin-unioncode/build/src/plugins/codegeex && /usr/bin/c++ -DDSG_DATA_DIR=\"/usr/share/dsg\" -DDSYSINFO_PREFIX=\"\" -DPREFIX=\"/usr\" -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_MESSAGELOGCONTEXT -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -Dcodegeex_EXPORTS -I/home/wlly-lzh/Work/deepin-unioncode/build/src/plugins/codegeex -I/home/wlly-lzh/Work/deepin-unioncode/src/plugins/codegeex -I/home/wlly-lzh/Work/deepin-unioncode/build/src/plugins/codegeex/codegeex_autogen/include -I/home/wlly-lzh/Work/deepin-unioncode/deepin-unioncode -I/home/wlly-lzh/Work/deepin-unioncode/PRIVATE -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.15.8 -I/usr/include/x86_64-linux-gnu/qt5/QtCore/5.15.8/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.15.8 -I/usr/include/x86_64-linux-gnu/qt5/QtGui/5.15.8/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.15.8 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets/5.15.8/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork/5.15.8 -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork/5.15.8/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtDBus/5.15.8 -I/usr/include/x86_64-linux-gnu/qt5/QtDBus/5.15.8/QtDBus -I/home/wlly-lzh/Work/deepin-unioncode/src -I/home/wlly-lzh/Work/deepin-unioncode -I/home/wlly-lzh/Work/deepin-unioncode/src/framework -I/home/wlly-lzh/Work/deepin-unioncode/3rdparty/cppdap/include -I/home/wlly-lzh/Work/deepin-unioncode/src/common -isystem /usr/include/dtk5/DWidget -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtDBus -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/dtk5/DGui -isystem /usr/include/dtk5/DCore -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/dtk5/DLog -isystem /usr/include/KF5/KSyntaxHighlighting -g -Wall -Wl,--as-need -fPIE -O3 -DNDEBUG -std=gnu++17 -fPIC -fPIC -MD -MT src/plugins/codegeex/CMakeFiles/codegeex.dir/widgets/inputeditwidget.cpp.o -MF CMakeFiles/codegeex.dir/widgets/inputeditwidget.cpp.o.d -o CMakeFiles/codegeex.dir/widgets/inputeditwidget.cpp.o -c /home/wlly-lzh/Work/deepin-unioncode/src/plugins/codegeex/widgets/inputeditwidget.cpp
/home/wlly-lzh/Work/deepin-unioncode/src/plugins/codegeex/widgets/inputeditwidget.cpp: In member function ‘virtual void TagObjectInterface::drawObject(QPainter*, const QRectF&, QTextDocument*, int, const QTextFormat&)’:
/home/wlly-lzh/Work/deepin-unioncode/src/plugins/codegeex/widgets/inputeditwidget.cpp:69:21: error: ‘DGuiApplicationHelper’ has not been declared
   69 |         DPalette dp(DGuiApplicationHelper::instance()->applicationPalette());
      |                     ^~~~~~~~~~~~~~~~~~~~~

疑似Cmake未引入相关依赖?

Reply Favorite View the author
All Replies
Mozart
deepin
2024-09-18 16:34
#1

这是没有发现DTK的依赖。

可以看看依赖是否已经正确安装,在工程根目录下执行 sudo apt build-dep .

如果是系统是很早以前的版本,也有可能DTK没有这个类,可以改下代码

image.png

Reply View the author
wlly-lzh
deepin
2024-09-18 16:48
#2
Mozart

这是没有发现DTK的依赖。

可以看看依赖是否已经正确安装,在工程根目录下执行 sudo apt build-dep .

如果是系统是很早以前的版本,也有可能DTK没有这个类,可以改下代码

image.png

应该不是没有这个类。

/usr/include/dtk5/DGui/dguiapplicationhelper.h中有这个类的定义。
截图_选择区域_20240918164259.png

Reply View the author
Mozart
deepin
2024-09-18 17:07
#3

看样子有对应的头文件,那按理来说不应该报未定义的错误,头文件也正确包含了吗?

Reply View the author
wlly-lzh
deepin
2024-09-18 17:36
#4
Mozart

看样子有对应的头文件,那按理来说不应该报未定义的错误,头文件也正确包含了吗?

截图_选择区域_20240918173444.png

包含了的。

Reply View the author
Mozart
deepin
2024-09-18 21:27
#5

前面加上命名空间试试呢
image.png

Reply View the author
ggbond
deepin
2024-09-18 21:49
#6

joy

Reply View the author
wlly-lzh
deepin
2024-09-19 11:43
#7
Mozart

前面加上命名空间试试呢
image.png

加上之后编译通过了,谢谢🙏。

Reply View the author