crc32库 qt_linux 下用arm体系QT编译问题(目前我系统里有X86 和 arm体系(老师编好的)的QT各一个)...

在Linux环境下尝试使用ARM版本的QT4.6.2编译hello.cpp程序,遇到链接错误,提示缺少libts-0.0.so.0、libz.so.1等库,同时出现undefined reference到uncompress、deflate等函数。已设置好环境变量和路径,但编译失败,寻求解决方案。
摘要由CSDN通过智能技术生成

我想在linux里用arm版的QT编译程序hello.cpp,环境变量PATH和lib路径均已添加好完毕[root@localhosttest2]#lshello.cpp[root@localhosttest2]#whichqmake/media/sdb/qt_arm_4.6.2/bin...

我想在linux里用arm版的QT 编译程序hello.cpp ,环境变量PATH 和 lib 路径均已添加好完毕

[root@localhost test2]# ls

hello.cpp

[root@localhost test2]# which qmake

/media/sdb/qt_arm_4.6.2/bin/qmake

[root@localhost test2]# qmake -project

QFileInfo::absolutePath: Constructed with empty filename

[root@localhost test2]# qmake

[root@localhost test2]# make

arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/media/sdb/qt_arm_4.6.2/mkspecs/qws/linux-arm-g++ -I. -I/media/sdb/qt_arm_4.6.2/include/QtCore -I/media/sdb/qt_arm_4.6.2/include/QtNetwork -I/media/sdb/qt_arm_4.6.2/include/QtGui -I/media/sdb/qt_arm_4.6.2/include -I. -I. -o hello.o hello.cpp

arm-linux-g++ -Wl,-O1 -Wl,-rpath,/media/sdb/qt_arm_4.6.2/lib -o test2 hello.o -L/media/sdb/qt_arm_4.6.2/lib -lQtGui -L/usr/local/arm/tslib/build/lib/ -L/media/sdb/qt_arm_4.6.2/lib -lQtNetwork -lQtCore -lpthread

/home/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: warning: libts-0.0.so.0, needed by /media/sdb/qt_arm_4.6.2/lib/libQtGui.so, not found (try using -rpath or -rpath-link)

/home/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: warning: libz.so.1, needed by /media/sdb/qt_arm_4.6.2/lib/libQtGui.so, not found (try using -rpath or -rpath-link)

/media/sdb/qt_arm_4.6.2/lib/libQtCore.so: undefined reference to `uncompress'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `deflate'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `inflate'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `ts_close'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `ts_config'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `inflateInit_'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `deflateInit_'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `ts_read'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `ts_read_raw'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `ts_open'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `crc32'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `deflateInit2_'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `inflateReset'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `deflateReset'

/media/sdb/qt_arm_4.6.2/lib/libQtCore.so: undefined reference to `compress2'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `ts_fd'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `compress'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `inflateEnd'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `inflateInit2_'

/media/sdb/qt_arm_4.6.2/lib/libQtGui.so: undefined reference to `deflateEnd'

collect2: ld returned 1 exit status

make: *** [test2] Error 1

[root@localhost test2]# 如能解答感激涕0

展开

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值