Chinaunix首页 | 论坛 | 博客
  • 博客访问: 530387
  • 博文数量: 87
  • 博客积分: 1549
  • 博客等级: 上尉
  • 技术积分: 970
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-14 16:56
文章分类
文章存档

2013年(10)

2012年(28)

2011年(49)

分类: LINUX

2011-05-02 17:18:58

好不容易把QTE交叉环境建立的差不多,progen,tmake,designer可以用,但是在最后一步make时,出现如下问题。
arm-linux-gcc  -o hello hello.o   -L/root/yizhi/qtopia-free-2.2.0/qt2/lib -lm -lqte -lm -lstdc++
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: warning: libz.so.1, needed by /root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so, not found (try using -rpath or -rpath-link)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: warning: libjpeg.so.62, needed by /root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so, not found (try using -rpath or -rpath-link)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: warning: libuuid.so.1, needed by /root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so, not found (try using -rpath or -rpath-link)
hello.o(.text+0x24): In function `main':
: undefined reference to `QApplication::QApplication(int&, char**)'
hello.o(.text+0x30): In function `main':
: undefined reference to `QString::QString(char const*)'
hello.o(.text+0x50): In function `main':
: undefined reference to `QLabel::QLabel(QString const&, QWidget*, char const*,
unsigned int)'
hello.o(.text+0x80): In function `main':
: undefined reference to `QStringData::deleteSelf()'
hello.o(.text+0xc4): In function `main':
: undefined reference to `QApplication::setMainWidget(QWidget*)'
hello.o(.text+0xdc): In function `main':
: undefined reference to `QApplication::exec()'
hello.o(.text+0xe8): In function `main':
: undefined reference to `QApplication::~QApplication()'
hello.o(.text+0xfc): In function `main':
: undefined reference to `QString::shared_null'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `uncompress'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `deflate'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_read_scanlines'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `inflate'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_set_defaults'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_start_decompress'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `inflateInit_'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_destroy_decompress'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_std_error'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_CreateDecompress'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `crc32'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `deflateInit2_'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `inflateReset'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `deflateReset'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_read_header'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_start_compress'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_destroy_compress'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_finish_decompress'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_resync_to_restart'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_CreateCompress'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_finish_compress'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `compress'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_set_quality'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `jpeg_write_scanlines'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `inflateEnd'
/root/yizhi/qtopia-free-2.2.0/qt2/lib/libqte.so: undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
make: *** [hello] Error 1
主要是库的问题(libz.so.1  libjpeg.so.62   libuuid.so.1),我到这些库所在位置使用file libz.so.1 出现:libz.so: ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped(申请我记得原先不是显示这些内容,好像是EAB  OS 之类的)用ldd libz.so.1 出现:not a dynamic executable
当时以为是库的问题,查了大量的资料,明白上述显示正常,因为交叉编译环境编出来的。
 
不是库的问题,那是什么,看到3.4.1交叉编译工具,但是我那些库都是用2.95.3编译出来的,对呀,故去查看setenv脚本,哦……,改成2.95.3交叉编译环境之后,搞定,不再出错……大功告成,折腾好几天了,不过也学了不少,特别是关于linux操作方面的。
 
阅读(2002) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~