将我的 QT 应用程序交叉编译到 raspberry-pi3 时如何修复未知错误

How to fix an unknown error when cross compiling my QT application to raspberry-pi3

我的程序 (QT/C++) 正在使用 python 模块从 google 驱动器下载一些视频,它工作得很好,但我无法交叉编译它覆盆子 pi3。 我是 QT Cross Compile for raspberry 的新手,我在任何地方都找不到这个错误的解决方案:

 #define _POSIX_C_SOURCE 200112L
 ^
In file included from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
                 from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/c++config.h:426,
                 from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/cstddef:41,
                 from /opt/qtrpi/raspi/qt5pi/include/QtCore/qglobal.h:45,
                 from /opt/qtrpi/raspi/qt5pi/include/QtCore/qtimer.h:43,
                 from /opt/qtrpi/raspi/qt5pi/include/QtCore/QTimer:1,
                 from DigitalSignal.h:5,
                 from DigitalSignal.cpp:1:
/opt/qtrpi/raspbian/sysroot/usr/include/./features.h:230:0: note: ceci est l'emplacement d’une précédente définition
 # define _POSIX_C_SOURCE 200809L
 ^
In file included from lib/python2.7/Include/Python.h:8:0,
                 from DigitalSignal.cpp:15:
lib/python2.7/Include/pyconfig.h:1242:0: warning: « _XOPEN_SOURCE » redéfini [enabled by default]
 #define _XOPEN_SOURCE 600
 ^
In file included from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
                 from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf/bits/c++config.h:426,
                 from /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/cstddef:41,
                 from /opt/qtrpi/raspi/qt5pi/include/QtCore/qglobal.h:45,
                 from /opt/qtrpi/raspi/qt5pi/include/QtCore/qtimer.h:43,
                 from /opt/qtrpi/raspi/qt5pi/include/QtCore/QTimer:1,
                 from DigitalSignal.h:5,
                 from DigitalSignal.cpp:1:
/opt/qtrpi/raspbian/sysroot/usr/include/./features.h:162:0: note: ceci est l'emplacement d’une précédente définition
 # define _XOPEN_SOURCE 700
 ^
In file included from lib/python2.7/Include/Python.h:61:0,
                 from DigitalSignal.cpp:15:
lib/python2.7/Include/pyport.h:895:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  ^
Makefile:1145: recipe for target 'DigitalSignal.o' failed
make: *** [DigitalSignal.o] Error 1


基于这个问题的解决方案Python compilation error: "LONG_BIT definition appears wrong for platform" .我在lib/python2.7/Include/pyconfig.h这一行进行了修改#define SIZEOF_LONG 8再见这一行#define SIZEOF_LONG 4(解释:'4'代表32位,'8'代表64位)。

但是现在我有一个我不明白的新错误:::

t/usr/lib/arm-linux-gnueabihf -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Xml -lQt5Core -Wl,-rpath-link,/opt/qtrpi/raspbian/sysroot/opt/vc/lib -lGLESv2 -lpthread 
/home/Documents/project/digitalsignage/lib/python2.7//libpython2.7.a : erreur lors de l'ajout de symboles : Format de fichier non reconnu
collect2: error: ld a retourné le statut de sortie 1
Makefile:170: recipe for target 'DigitalSignal' failed
make: *** [DigitalSignal] Error 1

谁能知道这个错误是什么意思???