资源描述
qt4.6.3我移植的参考文档
将qt-everywhere-opensource-src-4.6.3.tar.gz直接解压后复制2分,分别命名为pc、arm
qt-everywhere-opensource-src-4.6.3
X11
qt-everywhere-opensource-src-4.6.3# ./configure -no-openssl -nomake demos -nomake examples -nomake doc
make
make install
vi /etc/profile
/usr/local/Trolltech/Qt-4.6.3/bin
source /etc/profile
arm
qt-everywhere-opensource-src-4.6.3-arm#./configure -embedded arm -no-mouse-linuxtp-qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib -no-qt3support -no-openssl -nomake demos -nomake doc -nomake tools
-qt-gfx-transformed –lrt
第二次移植
./configure -embedded arm -no-mouse-linuxtp-qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib -no-qt3support -no-openssl -nomake demos -nomake doc -nomake tools -qt-gfx-transformed -lrt
make
make install
为支持触摸屏,开机自动设置环境变量,在2440的 /etc/profile中追加:
export LD_LIBRARY_PATH=/usr/local/lib:$QTDIR/lib:$LD_LIBRARY_PATH
export TSLIB_ROOT=/usr/local/lib
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_PLUGINDIR=/usr/local/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_CONFFILE=/usr/local/etc/ts.conf
export POINTERCAL_FILE=/etc/pointercal
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_MOUSE_PROTO=Tslib:/dev/input/event0
取消/usr/local/etc/ts.conf中的第一个注释:
开发板运行QT4程序(./hello: error while loading shared libraries: libts-0.0.so.0: cannot open s)
(2011-04-02 22:41:00)
转载▼
标签:
arm开发板
命令
超级终端
可执行文件
环境变量
it
分类: QT编程
1、在ARM开发板上运行QT4程序
要有跟ARM开发板上的QT根文件系统相同版本的QT开发环境,并且还要编译成embedded arm版本的,设置环境变量:
#vi setenv.sh
export QTEDIR=/usr/local/Trolltech/QtEmbedded-4.6.3-arm
export PATH=/usr/local/Trolltech/QtEmbedded-4.6.3-arm/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.6.3-arm/lib:$LD_LIBRARY_PATH
不知道为什么,这个文件好像没什么用,我还是用的全路径编译/usr/local/Trolltech/QtEmbedded-4.6.3-arm/bin/qmake
我的实例程序是叫 hello.cpp ,编译用下面命令:
#/usr/local/Trolltech/QtEmbedded-4.6.3-arm/bin/qmake -project
#/usr/local/Trolltech/QtEmbedded-4.6.3-arm/bin/qmake
#make
把 hello 下载到开发板上首先要给 hello 执行权限,命令:
#chmod +x hello
紧接着运行 hello 程序,输入命令:
#./hello
./hello: error while loading shared libraries: libts-0.0.so.0: cannot open s
hared object file: No such file or directory
可以看到运行出错,说是少libts-0.0.so.0,(可以用命令:#ldd hello 查看hello可执行文件的动态依赖库),那就把这个库加到 /lib/ 目录下,关键是怎么知道这个库在什么地方,这就靠 find 这个命令了,如下:
#find -name libts-0.0.so.\*
意思是寻找当前目录下以 libts-0.0.so.0 开头的文件,当然了你要在根目录下才能查询到所有的文件,找到后就把这个文件放到ARM开发板的 /lib/ 目录下就可以了,这是你再输入命令:
#./hello
就可以看到开发板上显示图形界面了,上面的命令都是在超级终端下输入的。
错误./hello: error while loading shared libraries: libQtGui.so.4: cannot open shared object file:
2012-05-15 07:56 2222人阅读 评论(3) 收藏 举报
objectfileqtpathlibrary360
之前一直想在ARM 上跑qt,但都出现错误:
./hello: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory
这主要是ARM 上的运行环境设置不当:
我用的是飞凌的6410 环境变量设置如下:
export PATH='/opt/Qtopia4.4.3/bin:/sbin:/usr/sbin:/bin:/usr/bin'
export QPEDIR='/opt/Qtopia4.4.3'
export QTDIR='/opt/Qtopia4.4.3'
export QT_QWS_FONTDIR='/opt/Qtopia4.4.3/lib/fonts/'
export QWS_DISPLAY='LinuxFb:mmWidth76:mmHeight44:1'
export QWS_MOUSE_PROTO='Tslib:/dev/input/event1'
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_CONFFILE='/usr/local/tslib/etc/ts.conf'
export TSLIB_CONSOLEDEVICE='none'
export TSLIB_FBDEVICE='/dev/fb0'
export TSLIB_PLUGINDIR='/usr/local/tslib/lib/ts'
export TSLIB_ROOT='/usr/local/tslib'
export TSLIB_TSDEVICE='/dev/input/event1'
export TSLIB_TSEVENTTYPE='H3600'
export QT_PLUGIN_PATH='/opt/Qtopia4.4.3/plugins:/opt/Qtopia4.4.3/qt_plugins/'
export LD_LIBRARY_PATH='/opt/Qtopia4.4.3/lib'//之前忘了加这条
error while loading shared libraries: libts-0.0.so.0: cannot open shared object file
(2012-02-01 17:14:34)
转载▼
标签:
it
分类: QT_Study
把libts-0.0.so.0所在路径添加到LD_LIBRARY_PATH中就行了
# gvim /etc/profile
LD_LIBRARY_PATH=路径:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
# source /etc/profile
展开阅读全文