急:有相应的库文件,但编译的时候还是提示找不到,什么原因?
时间:2011-03-24
来源:互联网
项目在同事的机子上编译没问题,拿到我这边编译就有错误,贴出错误信息:
/usr/local/arm/4.2.2-eabi/usr/bin-ccache/../lib/gcc/arm-unknown-linux-gnueabi/4.2.2/../../../../arm-unknown-linux-gnueabi/bin/ld:warning: libz.so.1, needed by /usr/local/arm/4.2.2-eabi//usr/lib/libfreetype.so, not found (try using -rpath or -rpath-link)/usr/local/arm/4.2.2-eabi//usr/lib/libfreetype.so: undefined reference to `inflateReset'
/usr/local/arm/4.2.2-eabi//usr/lib/libfreetype.so: undefined reference to `inflateEnd'
/usr/local/arm/4.2.2-eabi//usr/lib/libfreetype.so: undefined reference to `inflateInit2_'
/usr/local/arm/4.2.2-eabi//usr/lib/libfreetype.so: undefined reference to `inflate'
collect2: ld returned 1 exit status
make: *** [main] 错误
但是在编译器的的lib目录下有库文件
[root@localhost lib]# pwd
/usr/local/arm/4.2.2-eabi/usr/lib
[root@localhost lib]# ll libz*
-rwxr-xr-x 1 root root 80280 3月 23 16:23 libz.a
-rwxrwxrwx 1 root root 76298 3月 24 09:27 libz.so
lrwxrwxrwx 1 root root 21 3月 24 09:28 libz.so.1 -> usr/lib/libz.so.1.2.3
-rwxr-xr-x 1 root root 76298 3月 23 16:23 libz.so.1.2.3
[root@localhost lib]#
这是为什么呢?
/usr/local/arm/4.2.2-eabi/usr/bin-ccache/../lib/gcc/arm-unknown-linux-gnueabi/4.2.2/../../../../arm-unknown-linux-gnueabi/bin/ld:warning: libz.so.1, needed by /usr/local/arm/4.2.2-eabi//usr/lib/libfreetype.so, not found (try using -rpath or -rpath-link)/usr/local/arm/4.2.2-eabi//usr/lib/libfreetype.so: undefined reference to `inflateReset'
/usr/local/arm/4.2.2-eabi//usr/lib/libfreetype.so: undefined reference to `inflateEnd'
/usr/local/arm/4.2.2-eabi//usr/lib/libfreetype.so: undefined reference to `inflateInit2_'
/usr/local/arm/4.2.2-eabi//usr/lib/libfreetype.so: undefined reference to `inflate'
collect2: ld returned 1 exit status
make: *** [main] 错误
但是在编译器的的lib目录下有库文件
[root@localhost lib]# pwd
/usr/local/arm/4.2.2-eabi/usr/lib
[root@localhost lib]# ll libz*
-rwxr-xr-x 1 root root 80280 3月 23 16:23 libz.a
-rwxrwxrwx 1 root root 76298 3月 24 09:27 libz.so
lrwxrwxrwx 1 root root 21 3月 24 09:28 libz.so.1 -> usr/lib/libz.so.1.2.3
-rwxr-xr-x 1 root root 76298 3月 23 16:23 libz.so.1.2.3
[root@localhost lib]#
这是为什么呢?
作者: zyl987 发布时间: 2011-03-24
补充,项目所需的库文件和头文件一并拷了过来,放在了编译器的相应目录下了
作者: zyl987 发布时间: 2011-03-24
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28