获取“错误添加符号:未识别文件格式”交叉编译QT5的raspberry pi的错误

发布于 2025-01-24 05:31:20 字数 1256 浏览 6 评论 0原文

    -lpthread -lm /home/sincap/raspi/qt-everywhere-src-5.12.12/qtbase/lib/libqtpcre2.a   
/home/sincap/raspi/qt-everywhere-src-5.12.12/qtbase/lib/libqtpcre2.a: error adding symbols: File format not recognized
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1303: /home/sincap/raspi/qt-everywhere-src-5.12.12/lib/libQt5Core.so.5.12.12] Error 1
make[3]: Leaving directory '/home/sincap/raspi/qt-everywhere-src-5.12.12/qtbase/src/corelib'
make[2]: *** [Makefile:227: sub-corelib-make_first] Error 2
make[2]: Leaving directory '/home/sincap/raspi/qt-everywhere-src-5.12.12/qtbase/src'
make[1]: *** [Makefile:51: sub-src-make_first] Error 2
make[1]: Leaving directory '/home/sincap/raspi/qt-everywhere-src-5.12.12/qtbase'
make: *** [Makefile:82: module-qtbase-make_first] Error 2

我正在尝试将QT5从Ubuntu到Raspberry Pi3交叉,并在编译时遇到了此错误。我在下面使用配置。

./configure -release -no-opengl -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/raspi/linarold/bin/arm-linux-gnueabihf- -opensource -skip qtwayland -skip qtlocation -skip qtscript -make libs -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt-everywhere-src-5.12.12 -no-use-gold-linker -v -no-gbm -skip webengine

知道我如何解决这个问题?还是我还能如何跨编译QT5?

    -lpthread -lm /home/sincap/raspi/qt-everywhere-src-5.12.12/qtbase/lib/libqtpcre2.a   
/home/sincap/raspi/qt-everywhere-src-5.12.12/qtbase/lib/libqtpcre2.a: error adding symbols: File format not recognized
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1303: /home/sincap/raspi/qt-everywhere-src-5.12.12/lib/libQt5Core.so.5.12.12] Error 1
make[3]: Leaving directory '/home/sincap/raspi/qt-everywhere-src-5.12.12/qtbase/src/corelib'
make[2]: *** [Makefile:227: sub-corelib-make_first] Error 2
make[2]: Leaving directory '/home/sincap/raspi/qt-everywhere-src-5.12.12/qtbase/src'
make[1]: *** [Makefile:51: sub-src-make_first] Error 2
make[1]: Leaving directory '/home/sincap/raspi/qt-everywhere-src-5.12.12/qtbase'
make: *** [Makefile:82: module-qtbase-make_first] Error 2

I'm trying to cross compile qt5 from ubuntu to raspberry pi3 and got this error while compiling. I'm using configuration below.

./configure -release -no-opengl -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/raspi/linarold/bin/arm-linux-gnueabihf- -opensource -skip qtwayland -skip qtlocation -skip qtscript -make libs -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt-everywhere-src-5.12.12 -no-use-gold-linker -v -no-gbm -skip webengine

Any idea how I can fix this? or How else can I cross compile qt5?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文