正如@derhass 建议的那样,需要先安装所有必要的OpenGL库重新编译QT。
# essentials
sudo apt-get install build-essential libssl-dev python
# bluez stack (optional)
sudo apt-get install libbluetooth-dev bluetooth blueman bluez libusb-dev libdbus-1-dev bluez-hcidump bluez-tools
# OpenGL EGL support
sudo apt-get install mesa-utils libegl1-mesa libegl1-mesa-dev libgbm-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
# assuming QT is downloaded and extracted before
cd ~/qt-everywhere-src-5.12.6
./configure -confirm-license -opensource -nomake tests -nomake examples -openssl-linked
确保您获得与此类似的 EGLFS 部分:
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... yes
EGLFS GBM ............................ yes
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... no
EGLFS X11 ............................ yes
LinuxFB ................................ yes
VNC .................................... yes
Mir client ............................. no
然后编译并安装整个东西
make
sudo make install
编译您的项目并运行它。
cd mapviewer
/usr/local/Qt-5.12.6/qmake
make
./qml_location_mapviewer -platform eglfs