1

我已经尝试在 Windows 上为 raspberry pi3 构建 qt 6 个月了。我尝试了很多教程,阅读了很多论坛,但没有成功的结果。

我可以按照 RaspberryPi2EGLFS 在 vi​​rtualbox 中的 ubuntu 14.04 上构建 qt,它有一些错误,但我可以解决它们。我可以部署一个应用程序。我想在 Windows 上做同样的事情。

在http://visualgdb.com/tutorials/raspberry/qt/embedded/中有一个关于在 Windows 上构建的教程,我无法按照它构建。

一个可以为 raspberry pi3 构建 qt 的人通过参考上面的教程写到 qt 论坛。https://forum.qt.io/topic/68381/cross-compile-qt-windows-to-raspberry-3我试过这个我又得到错误。

我尝试了很多 QT 版本,例如 5.6.1、5.7.0、5.8.0、5.6.2(最后发布的长期支持版本)。Mingw 版本大于 4.9、MSVC2015 等。

每个版本都有不同的错误。5.7.0 有一个错误,他们说这个错误在 5.8.0 中已解决,而 5.8.0 中还有另一个错误。这个问题没有完成。

我只想在 Windows 上轻松地为树莓派 pi3 构建 qt。

请有人通过提供与支持 Raspberry Pi3 的版本协调工作的所有工具来编写教程

visualgdb 提供了编译器的链接,但它们是 Raspberry Pi3 的旧版本,它有错误,我无法构建 Qt。

最后输出:

正在执行影子构建... 正在准备构建树... 运行配置测试(阶段 1)... 已启用预编译头支持。C:/SysGCC/Raspberry/bin/arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c 符号可见性控制已启用。c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld.gold.exe: -plugin: 未知选项 c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.9/../../../../arm-linux-gnueabihf/bin/ld .gold.exe:使用 --help 选项获取使用信息 collect2.exe:错误:ld 返回 1 退出状态 C:/SysGCC/Raspberry/bin/arm-linux-gnueabihf-g++ --sysroot=C:/SysGCC/树莓/arm-linux-gnueabihf/sysroot -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c bsymbolic_functions.c:2:2: error: #error "


我用 4.9.2 更改 MinGW,而不是生成 qmake.exe 然后,我更改一行 ( if true; then ###[ '!' -f "$outpath/bin/qmake" ]; to if [ '!' -f "$outpath/bin/qmake" ]; 然后 ###[ '!' -f "$outpath/bin/qmake" ];) 在 qtbase 中配置文件。我再次运行配置。

$ ../qt-everywhere-opensource-src-5.6.2/configure -platform win32-g++ -xplatform linux-arm-gnueabi-g++ -release -opengl es2 -device linux-rpi3-g++ -sysroot C:/SysGCC/ Raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 -device-option CROSS_COMPILE=C:/SysGCC/Raspberry/bin/arm-linux-gnueabihf- -qt-xcb -verbose

输出:

构建选项:配置............可访问性accessibility-atspi-bridge alsa audio-backend c++11 c++14 clock-gettime clock-monotonic compile_examples concurrent cross_compile cups dbus egl eglfs eglfs_brcm enable_new_dtags evdev eventfd freetype完整配置 getaddrinfo getifaddrs harfbuzz iconv icu inotify ipv6ifname large-config largefile libudev linuxfb medium-config minimum-config mremap neon opengl opengles2 openssl pcre png posix_fallocate precompile_header qpa qpa reduce_exports 发布 rpath shared small-config system-jpeg system-zlib threadsafe-cloexec xcb xcb-glx xcb-plugin xcb-qt xcb-xlib xinput2 xkbcommon-qt xlib xrender 构建部分............ libs模式...... ... release 使用 sanitizer(s)...... 无 使用 C++ 标准 ..... c++14 使用黄金链接器....... 没有 使用新的 DTAGS ........ 是的
使用 PCH ........ 是 使用 LTCG ...... 否 目标编译器支持:Neon ...... ..... 是的

Qt 模块和选项: Qt D-Bus ...... 是(在运行时加载 dbus-1) Qt Concurrent .......... 是 Qt GUI .. ................ 是 Qt Widgets ............. 是 大文件 ............. 是
QML 调试.......... 是 使用系统代理 ..... 否

支持:可访问性............是ALSA............是CUPS............ ....... 是 Evdev ........ 是 FontConfig ...... 没有 FreeType ...... ......... 是(捆绑副本) Glib ............ 没有
GStreamer ......没有 GTK 主题 ................... 没有 HarfBuzz ...... 是(捆绑副本) Iconv .......... ........ 是的
ICU ....................是图像格式:GIF ...................是(插件,使用捆绑复制)JPEG ......................是(插件,使用系统库)PNG ......................是(在QtGui,使用捆绑副本) libinput ......没有日志后端:journald ......没有 syslog ...... .......... 没有 mtdev .................. 没有 网络:getaddrinfo .......... 是 getifaddrs .... ....... 是 IPv6 ifname .......... 是 libproxy....... 没有 OpenSSL ...... .. 是(在运行时加载库) OpenGL / OpenVG:EGL ........ 是 OpenGL ........ . 是 (OpenGL ES 2.0+) OpenVG ...... 没有 PCRE ................... 是(捆绑副本) pkg-config ...... 是 PulseAudio ...... 没有
QPA 后端:DirectFB ...... 没有 EGLFS ...... 是 EGLFS i.MX6 ............ 没有 EGLFS i.MX6 韦兰。没有 EGLFS EGLDevice .... 没有 EGLFS GBM .......... 没有 EGLFS Mali ...... 没有 EGLFS Raspberry Pi 。是 EGLFS X11 .......... 没有 LinuxFB ........ 是 Mir 客户端............ 没有 XCB .... ............. 是(捆绑副本)X 上的 EGL ...... 没有 GLX ...... . 是 MIT-SHM ............ 是 Xcb-Xlib ............ 是 Xcursor ............ 是(加载于运行时)Xfixes ......是(在运行时加载)Xi ......................没有 Xi2 ...... ........是Xinerama............是(在运行时加载)Xrandr............是(在运行时加载)Xrender .. …………

警告:找不到 XKB 配置根目录,使用 -xkb-config-root 设置 XKB 配置数据的路径。这是键盘输入支持所必需的。

注意:Qt 在这个系统上使用 double 表示 qreal。这与 Qt 5.1 二进制不兼容。使用“-qreal float”进行配置以创建与 5.1 二进制兼容的构建。

Qt 现在配置为构建。只需运行'make'。一切都构建好后,您必须运行“make install”。Qt 将安装到 /usr/local/qt5

在重新配置之前,请确保从以前的构建中删除任何剩余部分。

TheBUKs@DESKTOP-5D6JDFN MSYS /c/qt/qt-build $ make cd qtbase/ && ( test -e Makefile || C:/qt/qt-build/qtbase/bin/qmake.exe C:/qt/qt- Everywhere-opensource-src-5.6.2/qtbase/qtbase.pro -o Makefile ) && C:/SysGCC/Raspberry/bin/make -f Makefile make[1]: 进入目录C:/Qt/qt-build/qtbase' C:/qt/qt-build/qtbase/bin/qmake.exe -o Makefile C:/qt/qt-everywhere-opensource-src-5.6.2/qtbase/qtbase.pro make[1]: Leaving directoryC:/Qt/qt-build/qtbase ' make[1]: 进入目录C:/Qt/qt-build/qtbase' cd src/ && ( test -e Makefile || C:/qt/qt-build/qtbase/bin/qmake.exe C:/qt/qt-everywhere-opensource-src-5.6.2/qtbase/src/src.pro -o Makefile ) && C:/SysGCC/Raspberry/bin/make -f Makefile make[2]: Entering directoryC:/Qt/qt-build/qtbase/src' C:/qt/qt-build/qtbase/bin/qmake.exe -o Makefile C:/qt/qt-everywhere-opensource -src-5.6.2/qtbase/src/src.pro make[2]: 离开目录C:/Qt/qt-build/qtbase/src' make[2]: Entering directoryC:/Qt/qt-build/qtbase/src' cd corelib/ && ( test -e Makefile.qtzlib || C:/ qt/qt-build/qtbase/bin/qmake.exe C:/qt/qt-everywhere-opensource-src-5.6.2/qtbase/src/corelib/qtzlib.pro -o Makefile.qtzlib ) && C:/SysGCC /Raspberry/bin/make -f Makefile.qtzlib make[3]: 进入目录C:/Qt/qt-build/qtbase/src/corelib' C:/qt/qt-build/qtbase/bin/qmake.exe -o Makefile.qtzlib C:/qt/qt-everywhere-opensource-src-5.6.2/qtbase/src/corelib/qtzlib.pro make[3]: Leaving directoryC:/Qt/qt-build/qtbase/src/corelib'make[3]:C:/Qt/qt-build/qtbase/src/corelib' make[3]: Nothing to be done for先进入目录'。make[3]: 离开目录 C:/Qt/qt-build/qtbase/src/corelib' The syntax of the command is incorrect. make[2]: *** [sub-bootstrap-make_first] Error 1 make[2]: Leaving directoryC:/Qt/qt-build/qtbase/src' make[1]: * [sub-src-make_first] 错误 2 make[1]: 离开目录 `C:/Qt/qt- build/qtbase' make: *** [module-qtbase-make_first] 错误 2 *

4

0 回答 0