mips 编译QT4库文件

参考博客:https://blog.csdn.net/yihui8/article/details/39503645

自己写的好多程序都是以QT库为基础的。QT提供的开发工具和库用起来很方便。

开发板提供的软件包没有提供QT库,就自己参考网上的文章自己编译了。。

记录下编译过程:

下载qt源码:

http://download.qt.io/archive/qt/4.8/4.8.7/

修改对应的文件:

qt-everywhere-opensource-src-4.8.7/mkspecs/qws/linux-mips-g++/qmake.conf

#
# qmake configuration for building with mipsel-linux-g++
#

include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)

# modifications to g++.conf
QMAKE_CC                = mipsel-openwrt-linux-gcc
QMAKE_CXX               = mipsel-openwrt-linux-g++
QMAKE_CFLAGS           += -mips32
QMAKE_CXXFLAGS         += -mips32
QMAKE_LINK              = mipsel-openwrt-linux-g++
QMAKE_LINK_SHLIB        = mipsel-openwrt-linux-g++

# modifications to linux.conf
QMAKE_AR                = mipsel--linux-ar cqs
QMAKE_OBJCOPY           = mipsel-openwrt-linux-objcopy
QMAKE_STRIP             = mipsel-openwrt-linux-strip

load(qt_config)

编译参数:

./configure -force-pkg-config \
-prefix /opt/mipsQT \
-release \
-opensource \
-shared \
-qconfig dist \
-no-exceptions \
-no-accessibility \
-no-stl \
-no-qt3support \
-no-xmlpatterns \
-no-multimedia \
-no-audio-backend \
-no-phonon \
-no-phonon-backend \
-no-svg \
-no-webkit \
-no-javascript-jit \
-no-script \
-no-scripttools \
-no-declarative \
-no-declarative-debug \
-qt-zlib \
-qt-freetype \
-no-gif \
-no-libpng \
-no-libmng \
-no-libtiff \
-no-libjpeg \
-no-openssl \
-nomake tools \
-nomake demos \
-nomake examples \
-nomake docs \
-nomake translations \
-no-nis \
-no-cups \
-no-iconv \
-no-pch \
-embedded mips \
-little-endian \
-platform qws/linux-x86-g++ \
-xplatform qws/linux-mips-g++ \
-no-gtkstyle \
-no-nas-sound \
-no-opengl \
-no-openvg \
-no-sm \
-no-xshape \
-no-xvideo \
-no-xsync \
-no-xinerama \
-no-xcursor \
-no-xfixes \
-no-xrandr \
-no-xrender \
-no-mitshm \
-no-fontconfig \
-no-xinput \
-no-xkb \
-no-dbus \
-no-gui

最后

make

make install

编译的时候回出现以下错误:

修改qmake生成的Makefile文件在LIBS后面添加-ldl 即可。

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值