ld找不到'GLESv2'库

问题描述 投票:0回答:1

我想从一个arch linux(64位)主机交叉编译来自raspberry pi 3模型B的qt 5.7.1。所以,为了这个目的,我正在学习本教程:https://www.raspberrypi.org/forums/viewtopic.php?t=204529#p1269019。但是,当我在“/ opt / qt5pi / qt5build /”目录中执行这些命令时:

../qt-everywhere-opensource-src-5.7.1/configure -no-use-gold-linker -opengl es2 -device linux-rpi3-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf- -sysroot /opt/qt5pi/sysroot -prefix /usr/local/qt5pi -opensource -confirm-license -skip qtwebengine -skip qtscript -nomake examples -make libs

make

链接器工具/ arm-bcm2708 / gcc-linaro-arm-linux-gnueabihf-raspbian-x64 / arm-linux-gnueabihf / bin / ld发送此错误:

ld: cannot find -lGLESv2
qt raspberry-pi linker cross-compiling
1个回答
0
投票

@allebas,我有同样的问题,我希望这可能有用:

1)首先在我的.pro上我必须链接所有必要的库,要小心,因为包含的顺序非常重要,请参阅下面的示例来自我的旧项目:

TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += \
        main.cpp

LIBS += -L "/usr/include/libdrm" \
        -lglfw -lrt -lm -ldl -lGLEW -lGLU -lGLESv2 -lGL \
        -lpthread -pthread -ldrm -lXdamage -lXfixes -xcb \
        -lxcb-glx -lxcb-dri2 -lXxf86vm -lXext -lX11 -lpthread -lxcb \
        -lXau -lXdmcp -lXcursor -lglut -lXrandr

2)如果在仔细检查您的系统上未安装此特定库之后,则以下步骤应帮助您安装缺少的库(ies):

sudo apt-get install libglfw3-dev libgles2-mesa-dev

3)另请参阅following source,因为它解释了如果您的系统上仍然缺少某些库,如何执行所有安装步骤

© www.soinside.com 2019 - 2024. All rights reserved.