使用海思v500交叉编译器编译qt5.4.2版本

今天编译测试了下Qt的Webkit,在5.6版本以后,qt移除了webkit,换为了QWebEngine,这个QWebEngine不太好编译,没有编译过,就选了Q5.4.2版本,编译了webkit,这个编译通过了,放板子上调了下也能用,但是感觉效果不好。

qt配置命令脚本:

../qt-everywhere-opensource-src-5.4.2/configure -v -release \
		-extprefix  /opt/qt5.4-hisi \
        -opensource \
        -confirm-license  \
        -qt-sql-sqlite \
        -no-sse2 \
        -no-sse3 \
        -no-ssse3 \
        -no-sse4.1 \
        -no-sse4.2 \
        -no-avx \
        -no-avx2 \
        -no-mips_dsp \
        -no-mips_dspr2 \
        -no-pkg-config \
        -qt-zlib \
        -qt-libpng \
        -qt-libjpeg \
        -qt-freetype \
        -no-openssl \
        -qt-pcre \
        -qt-xkbcommon \
        -no-glib  \
        -nomake examples \
        -nomake tools \
        -nomake tests \
        -no-cups \
        -no-iconv \
        -no-dbus \
        -xplatform linux-arm-hisiv500-g++ \
        -no-use-gold-linker \
		-tslib \
		-I/opt/tslib5/include \
		-L/opt/tslib5/lib \
		-qpa linuxfb \
        -qreal float
exit

这个命令执行没有出问题,然后make -j8开始编译,这个过程比较慢,编译过程中出现几个问题,基本上都是webkit的相关部分的报错,主要有以下两个:

  1. 类型转换JSChar * 与UChar的转换,在变量前面加上强制类型转换即可(JSChar)或者(UChar*)。
  2. 还有个是少分号的“;”,直接在少分号的行后面加上分号即可。
    整体上来说编译问题不大。

编译完成后,make install
我是直接把编译出来的库文件到下到板子上了,然后编译一个测试程序,刚开始出现这个问题:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)

在configure配置命令里加上以下参数重新编译了qt源码后解决了:

		-tslib \
		-I/opt/tslib5/include \
		-L/opt/tslib5/lib \
		-qpa linuxfb \

然后运行测试程序,也能打开网页,但是要想实现电脑上浏览器的效果,还是有很多路要走的!
感觉在嵌入式上不太实用。
编译的文件放在了百度网盘,想体验的朋友可以去下载:

链接:https://pan.baidu.com/s/1yI7CLM2K6j_2KBFiXKkSDw
提取码:813v

微信公众号:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

fensnote

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值