Yocto: cross-compile problem with QtCreator



  • Hello,

    i use the meta-toolchain-qt5 from the Yocto Project to create a cross-compile Environment for an ARM Board (am335x) on an Ubuntu x86_64 host.
    I can already compile a Project within the console with:

    source /opt/qt5devtools/environment-setup-cortexa8hf-vfp-neon-linux-gnueabi
    qmake
    make 
    

    But it fails within the QtCreator. I inserted already the "source" in the first line of the qtcreator.sh
    But everytime i want to compile the Project I get the following error:

    /usr/bin/make -f Makefile.Release
    make[1]: Entering directory '/home/in-tech/server_sw'
    arm-linux-gnueabihf-g++ -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/opt/qt5devtools/sysroots/cortexa8hf-vfp-neon-linux-gnueabi -c -pipe -isystem/opt/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/include -fstack-protector -O2 -pipe -g -feliminate-unused-debug-types -std=gnu++0x -pthread -O2 -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_BLUETOOTH_LIB -DQT_CORE_LIB -I. -I/opt/qt5devtools/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/qt5 -I/opt/qt5devtools/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtNetwork -I/opt/qt5devtools/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtBluetooth -I/opt/qt5devtools/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtCore -Irelease -I/opt/qt5devtools/sysroots/x86_64-arago-linux/mkspecs/linux-oe-g++ -o release/can_worker.o can_worker.cpp
    In file included from /opt/qt5devtools/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtCore/qnamespace.h:37:0,
    from /opt/qt5devtools/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtCore/qobjectdefs.h:41,
    from /opt/qt5devtools/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtCore/qobject.h:40,
    from /opt/qt5devtools/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtCore/QObject:1,
    from can_worker.h:3,
    from can_worker.cpp:1:
    /opt/qt5devtools/sysroots/cortexa8hf-vfp-neon-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:39:21: fatal error: cstddef: No such file or directory
    include <cstddef>
    ^
    compilation terminated.

    This already happens with a simple Hello World program. Seems like some Library Path is missing?
    Would be great if anybody could help.
    Thanks


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you check where that header might be in your cross-compiler setup ?



  • Did you find a solution for this problem? I currently have the same issue.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.