Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1562073
  • 博文数量: 290
  • 博客积分: 3468
  • 博客等级: 中校
  • 技术积分: 3461
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-28 22:21
文章分类

全部博文(290)

文章存档

2016年(13)

2015年(3)

2014年(42)

2013年(67)

2012年(90)

2011年(75)

分类: 嵌入式

2013-11-19 15:21:50

参考链接:
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

阅读(2747) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~