各位好:
我在为同事搭建ARM linux 的qt应用程序开发平台,遇到一些问题,请教大家。
PC 平台cat /proc/version
Linux version 3.8.0-19-generic (buildd@allspice) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) ) #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013
通过网上的教程拼凑的安装了PC上的QT环境。
which -a qmake
/usr/bin/qmake
/usr/local/Trolltech/Qt-4.7.4/bin/qmake
/usr/bin/qmake -v
QMake version 2.01a
Using Qt version 4.8.4 in /usr/lib/x86_64-linux-gnu
/usr/local/Trolltech/Qt-4.7.4/bin/qmake -v
QMake version 2.01a
Using Qt version 4.7.4 in /usr/local/Trolltech/Qt-4.7.4/lib
使用/usr/local/bin/qmake 编译简单的helloworld代码,生成文件:
Makefile qt qthellow.cpp qthellow.o qt.pro
查询依赖:
arm-linux-gnueabihf-readelf -a ./qt | grep "Shared library"
0x00000001 (NEEDED) Shared library: [libQtGui.so.4]
0x00000001 (NEEDED) Shared library: [libQtCore.so.4]
0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.6]
ARM板上查询这几个库是否存在:
# find /opt/Trolltech/lib/ -name libQtGui.so.4
/opt/Trolltech/lib/libQtGui.so.4
# find /opt/Trolltech/lib/ -name libQtCore.so.4
/opt/Trolltech/lib/libQtCore.so.4
# find / -name libstdc++.so.6
/usr/lib/libstdc++.so.6
# find / -name libgcc_s.so.1
/lib/libgcc_s.so.1
# find / -name libc.so.6
/lib/libc.so.6
用export查看:得到
export LD_LIBRARY_PATH='/opt/Trolltech/lib:/lib:/usr/lib'
拷贝qt文件,到ARM板上执行:
# ./qt
-sh: ./qt: not found
无法执行。
请各位帮忙支支招。
|