Yocto交叉编译Qt5 cstddef:没有这样的文件或目录

时间:2020-04-06 17:18:57

标签: c++ qt qt-creator ubuntu-18.04 yocto

我一直在关注这个网站https://www.ics.com/blog/configuring-qt-creator-yocto-evelopment,以在Ubuntu 18.04上为带有Qt5的ARM模拟器构建一个简单的yocto映像。 我正在尝试使用生成的工具链按照网站中的说明构建电子表格项目示例,但是我遇到了这些错误(也尝试使用命令行,结果相同)

/opt/poky/2.2.4/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake /home/david/Qt/Examples/Qt-5.14.2/widgets/itemviews/spreadsheet/spreadsheet.pro -spec linux-oe-g++ CONFIG+=debug CONFIG+=qml_debug

/home/david/Qt/Examples/Qt-5.14.2/widgets/itemviews/spreadsheet/spreadsheet.pro:2: 'qtConfig' is not a recognized test function.

这是我包含在bitbake构建映像中的软件包的列表:

# add the Qt packages so that they get included in the built image and we don't have to install them separately
IMAGE_INSTALL_append = " gcc g++ binutils libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev eglibc-staticdev autoconf automake ccache chkconfig glib-networking packagegroup-core-buildessential pkgconfig boost cmake zlib glib-2.0 qt3d qt5-plugin-generic-vboxtouch qtbase qtcanvas3d qtcharts qtconnectivity qtdatavis3d qtdeclarative qtenginio qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquick1 qtquickcontrols2 qtquickcontrols qtscript qtsensors qtserialport qtsvg qtsystems qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebkit-examples qtwebkit qtwebsockets qtxmlpatterns openssh-sftp-server gdb gdbserver"

您是否有解决此问题的想法?


编辑

通过在电子表格.pro文件中注释“ requires(qtConfig(treeview))”,该错误消失了,但是编译时出现以下错误:

In file included from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtGui/qwindowdefs.h:43:0,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qmainwindow.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/QMainWindow:1,
                 from ../spreadsheet.h:54,
                 from ../main.cpp:51:
/opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:45:21: fatal error: cstddef: No such file or directory
 #  include <cstddef>
                     ^
compilation terminated.
In file included from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtGui/qwindowdefs.h:43:0,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qframe.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qabstractscrollarea.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qabstractitemview.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qtableview.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/QTableView:1,
                 from ../printview.h:54,
                 from ../printview.cpp:51:
/opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:45:21: fatal error: cstddef: No such file or directory
 #  include <cstddef>
                     ^
In file included from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qnamespace.h:43:0,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qobjectdefs.h:48,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qobject.h:46,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qabstractitemdelegate.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qitemdelegate.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/QItemDelegate:1,
                 from ../spreadsheetdelegate.h:54,
                 from ../spreadsheetdelegate.cpp:51:
/opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:45:21: fatal error: cstddef: No such file or directory
 #  include <cstddef>
                     ^
compilation terminated.
compilation terminated.
In file included from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtGui/qwindowdefs.h:43:0,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/qmainwindow.h:43,
                 from /opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtWidgets/QMainWindow:1,
                 from ../spreadsheet.h:54,
                 from ../spreadsheet.cpp:51:
/opt/poky/2.2.4/sysroots/armv5e-poky-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:45:21: fatal error: cstddef: No such file or directory
 #  include <cstddef>
                     ^
compilation terminated.
Makefile:2092: recipe for target 'spreadsheetdelegate.o' failed
Makefile:1063: recipe for target 'main.o' failed
Makefile:1649: recipe for target 'spreadsheet.o' failed
Makefile:1187: recipe for target 'printview.o' failed
make: *** [spreadsheetdelegate.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [main.o] Error 1
make: *** [spreadsheet.o] Error 1
make: *** [printview.o] Error 1

我对Qt还是很陌生,我不确定如何解决这个问题,希望有人有主意吗?

干杯

0 个答案:

没有答案
相关问题