- 工具及软件包
- 交叉编译工具链
arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- 软件包
dbus-1.10.0.tar.gz
openssl-1.1.0.tar.gz
tslib-1.15.tar.gz
Native_SDK-3.5.zip [此SDK为PowerVR的SDK,用来编译OpenGL/OpenGL ES支持]
qt-everywhere-opensource-src-5.9.6.tar.gz
- 交叉编译工具链
- 修改qmake.conf文件
进入目录: qt-everywhere-opensource-src-5.9.6/qtbase/mkspecs/linux-arm-gnueabi-g++
vim qmake.conf
QT_QPA_DEFAULT_PLATFORM = EGLFS
QMAKE_CFLAGS_RELEASE += -O2 -march=armv7-a
QMAKE-CXXFLAGS_RELEASE += -O2 -march=armv7-a
QMAKE_INCDIR_OPENGL_ES2 = /home/engineer/Embedded-Qt/Native_SDK-3.5/Builds/Include
QMAKE_LIBDIR_OPENGL_ES2 = /home/engineer/Embedded-Qt/Native_SDK-3.5/Builds/Linux/armv7/Lib
QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lGLES_CM -lews
QMAKE_INCDIR_EGL = /home/engineer/Embedded-Qt/Native_SDK-3.5/Builds/Include
QMAKE_LIBDIR_EGL = /home/engineer/Embedded-Qt/Native_SDK-3.5/Builds/Linux/armv7/Lib
QMAKE_LIBS_EGL = -lEGL -lews
OPENSSL_LIBS = -L/home/engineer/Embedded-Qt/lib/lib -lssl -lcrypto
DBUS_LIBS = -L/home/engineer/Embedded-Qt/lib/lib -ldbus-1
# modifications to g++.conf
QMAKE_CC = arm-none-linux-gnueabi-gcc
QMAKE_CXX = arm-none-linux-gnueabi-g++
QMAKE_LINK = arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
QMAKE_NM = arm-none-linux-gnueabi-nm -P
QMAKE_STRIP = arm-none-linux-gnueabi-strip
- 配置选项[注意:提高权限执行]
./configure -v -xplatform linux-arm-gnueabi-g++ -prefix /usr/local/Embedded-Qt5.9.6 -opensource -release -opengl es2 -dbus-runtime -c++std c++11 -no-openssl --xcb=no --iconv=no --pcre=qt --zlib=qt --freetype=qt --harfbuzz=qt --libpng=qt --libjpeg=qt --sqlite=qt --assimp=qt --webengine-icu=qt --ffmpeg=qt --opus=qt --webp=qt -I /home/engineer/Embedded-Qt/lib/include/ -L /home/engineer/Embedded-Qt/lib/lib/
- 编译及安装
make
make install
原文地址:https://www.cnblogs.com/Focus-Flying/p/9271957.html
时间: 2024-10-29 16:03:16