将我的QT应用程序交叉编译到raspberry-pi3时,如何修复未知错误 [英] How to fix an unknown error when cross compiling my QT application to raspberry-pi3

查看:303
本文介绍了将我的QT应用程序交叉编译到raspberry-pi3时,如何修复未知错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序(QT / C ++)使用python模块从Google驱动器下载了一些视频,效果很好,但是我无法针对树莓派pi3进行交叉编译。
我是树莓QT Cross Compile的新手,在任何地方都找不到此错误的解决方案:

my program (QT/C++)is using a python module to download some video from google drive, it's work very well but I couldn't cross compile it for raspberry pi3. I am new in QT Cross Compile for raspberry and I couldn't find a solution for this error in any place :

 #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编译错误:平台的LONG_BIT定义似乎错误 lib / python2.7 / Include / pyconfig.h 此行 #define SIZEOF_LONG 8 再此行 #define SIZEOF_LONG 4 (解释: 32位为'4',64位为'8')。

Basing on the solution of this problem Python compilation error: "LONG_BIT definition appears wrong for platform" .I changed in lib/python2.7/Include/pyconfig.h this line #define SIZEOF_LONG 8 bye this line #define SIZEOF_LONG 4 (explanation : '4' for 32 bits and '8' for 64 bits ).

但是现在我遇到了一个新错误不明白:::

but now I have a new error that i does't understand :::

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

任何人都可以知道此错误的含义吗?

can anyone what is the meaning of this error ???

这篇关于将我的QT应用程序交叉编译到raspberry-pi3时,如何修复未知错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆