2020.8.25 更新:树莓派上 Qt 开发环境的搭建
以下内容需要Raspbian环境。下载并编译Qt-base
设置环境
操作界面设置为CLI,并将用于VideoCore的内存设置为最小:16MB。
获取Qt5源代码
$ git clone git://gitorious.org/qt/qtbase.git $ git clone git://gitorious.org/qt/qtjsbackend.git $ git clone git://gitorious.org/qt/qtdeclarative.git $ git clone git://gitorious.org/qt/qtwayland.git $ cd qtbase $ ./configure -opensource -confirm-license -qreal float -fully-process -no-c++11 -nomake tests -nomake examples -make libs -prefix /opt/qt5 $ make && sudo make install $ cd ../qtjsbackend $ /opt/qt5/bin/qmake $ make && make install $ cd ../qtjsbackend $ /opt/qt5/bin/qmake $ make && make install $ cd ../qtdeclarative $ /opt/qt5/bin/qmake $ make && make install $ cd ../qtwayland $ /opt/qt5/bin/qmake $ make && make install
测试一下,需要退出X Windows。
$ cd qtbase/examples/opengl/hellowindow $ qmake $ make $ weston-launch & $ ./hellowindow -platform waylaid
参考资料:
[1] http://wayland.freedesktop.org/qt5.html
./configure -opensource -confirm-license -qreal float -fully-process -no-c++11 -nomake tests -nomake examples -make libs -prefix /opt/qt5
执行以上这一步时报错:-fully-process: invalid command-line switch