参考链接:
http://www.cnblogs.com/leaven/archive/2010/10/13/1850129.html
apt-get install libdirectfb-dev
1. on X86 os: ubuntu 10.04
./configure -release -shared -fast -no-largefile -qt-sql-sqlite -no-webkit -qt-zlib -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -make libs -nomake tools -nomake examples -nomake docs -nomake demo -embedded x86 -little-endian -qt-freetype -depths 16,18,24 -no-glib -qt-gfx-directfb -plugin-gfx-directfb
2. on jz4780(mipsel) os: debian 7
./configure -opensource -release -shared -fast \
-no-largefile -qt-sql-sqlite -no-webkit \
-qt-zlib -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg \
-make libs -nomake tools -nomake examples -nomake docs -nomake demo \
-platform qws/linux-mips-g++ \
-embedded mips -little-endian \
-qt-freetype -depths 16,18,24,32 -no-glib \
-qt-gfx-directfb -plugin-gfx-directfb \
-lrt
Creating qmake. Please wait...
make: Current time: Timestamp out of range; substituting 1970-01-01 00:00:00
make: Warning: File `Makefile' has modification time 1.4e+09 s in the future
make: Nothing to be done for `first'.
make: warning: Clock skew detected. Your build may be incomplete.
The DirectFB screen driver functionality test failed!
You might need to modify the include and library search paths by editing
QT_CFLAGS_DIRECTFB and QT_LIBS_DIRECTFB in
/root/qt-everywhere-opensource-src-4.8.2/mkspecs/qws/linux-mips-g++.
# date --set "20131106 18:00:00"
# directfb-config --cflags
-I/usr/include/directfb -D_REENTRANT
# directfb-config --libs
-L/usr/lib/mipsel-linux-gnu -ldirectfb -lfusion -ldirect -lpthread
a. # vi /root/qt-everywhere-opensource-src-4.8.2/mkspecs/qws/linux-mips-g++
添加:
QT_CFLAGS_DIRECTFB = -I/usr/include/directfb -D_REENTRANT
QT_LIBS_DIRECTFB = -L/usr/lib/mipsel-linux-gnu -ldirectfb -lfusion -ldirect -lpthread
b. .obj/release-shared-emb-mips/qtconcurrentiteratekernel.o: In function `getticks()':
qtconcurrentiteratekernel.cpp:(.text+0x38): undefined reference to `clock_gettime'
qtconcurrentiteratekernel.cpp:(.text+0x44): undefined reference to `clock_gettime'
在配置时加入-lrt选项,使得编译程序可以去librt中寻找相关定义
c. 例程测试
为了验证功能是否正常,应当编译一个小程序来运行看看,先进入编译的Qt源码目录,进入后
#cd example/mainwindows/application
#/usr/local/Trolltech/QtEmbedded4.8.2-mips/bin/qmake
#make
生成application程序后,拷贝至开发板NFS的目录
#cp application /forlinx/root/home/cnnbboy
最后,就是执行程序测试
#./application -qws -display directfb
阅读(2738) | 评论(0) | 转发(0) |