下载qt-embedded-linux-opensource-src-4.5.3.tar.gz
解压,进入目录,然后配置
编译脚本文件run.sh,代码如下:
#!/bin/bash
(echo o;echo yes)|./configure -prefix /usr/local/qt -shared -xplatform qws/linux
-arm-g++ -embedded arm -little-endian -qt-gfx-linuxfb -qt-kbd-usb -qt-mouse-tslib -qt-zlib -qt-freetype -qt-libtiff -qt-libpng -qt-libmng
修改权限chmiod 755 run.sh
运行./run.sh
最后make,make install
编译一个在arm上的程序,用 /usr/local/Qt/bin/qmake -project /usr/local/Qt/bin/qmake make 三个命令
把程序移到开发板上,最后执行,发现会出错error while loading shared libraries: libQtCore.so.4: cannot open shared object file: No such file or directory
这里指示 缺少
libQtCore.so.4文件,你可以在安装qt-embedded-linux-opensource-src-4.5.3的安装目录里面的lib目录找到这个文件,其他的一样,
库文件移动完,还在一个错误
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
No Qt for Embedded Linux server appears to be running.
If you want to run this program as a server,
add the "-qws" command-line option.
根据提示 需要加一个-qws参数
然后还会出错
QFontDatabase: Cannot find font directory /usr/local/Qt/lib/fonts - is Qt installed correctly?
Aborted
这里缺少字体文件,可以在安装qt-embedded-linux-opensource-src-4.5.3的安装目录里面的lib目录找到这个文件夹,拷贝到开发板,再执行,就Ok了。
./configure -opensource -embedded arm -xplatform qws/linux-arm-g++ -no-webkit -qt-libtiff -qt-libmng -qt-mouse-tslib -qt-mouse-pc -no-mouse-linuxtp -fast -qt-sql-sqlite
阅读(4359) | 评论(0) | 转发(1) |