求高人指点这是咋回事。。。。

zyyjaf 2010-07-29 04:55:10
/C2sAll/c2/100526/bin/../lib/gcc/c2-linux-uclibc/4.0.3/../../../../c2-linux-ucli bc/bin/ld: skipping incompatible /home/zhangyy/c2_local/lib/libupnp.so when sear ching for -lupnp
/C2sAll/c2/100526/bin/../lib/gcc/c2-linux-uclibc/4.0.3/../../../../c2-linux-ucli bc/bin/ld: skipping incompatible /home/zhangyy/c2_local/lib/libupnp.a when searc hing for -lupnp
/C2sAll/c2/100526/bin/../lib/gcc/c2-linux-uclibc/4.0.3/../../../../c2-linux-ucli bc/bin/ld: cannot find -lupnp
collect2: ld returned 1 exit status
make: *** [all] 错误 1
下面是makefile文件:
ET = upnp_mp

CFLAGS = -D_FILE_OFFSET_BITS=64
LIBS = -lupnp -lfuse -lthreadutil -lixml -lpthread
SOURCE = main.c upnp_fs.c
#GCC = gcc
GCC = c2-linux-gcc
#LOCAL = local
LOCAL = c2_local


all:
$(GCC) $(SOURCE) $(CFLAGS) -I/home/zhangyy/$(LOCAL)/include -L/home/zhangyy/$(LOCAL)/lib $(LIBS) -o upnp_mp
...全文
142 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ForestDB 2010-07-29
  • 打赏
  • 举报
回复
"skipping incompatible" means that ld is skipping over libraries/archives that
are the wrong architecture. In this case, ld is skipping 32bit archives while
trying to link a 64bit binary. This is all well and good.

You can normally ignore these messages because ld is pretty good and eventually
finding the correct libs.

这是Google的结果,简单讲就是库不对/不兼容,ld忽略了,从你的路径来看,lib的路径似乎不对(你的toolchain在c2-linux-uclibc/bin下,但是lib却在c2_local/lib下,确定?)。
zyyjaf 2010-07-29
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 jamesf1982 的回复:]
/C2sAll/c2/100526/bin/../lib/gcc/c2-linux-uclibc/4.0.3/../../../../c2-linux-ucli bc/bin/ld: skipping incompatible /home/zhangyy/c2_local/lib/libupnp.so when sear ching for -lupnp


看这句话,我猜测是“skippi……
[/Quote]
能说更明白一点么?
james_hw 2010-07-29
  • 打赏
  • 举报
回复
/C2sAll/c2/100526/bin/../lib/gcc/c2-linux-uclibc/4.0.3/../../../../c2-linux-ucli bc/bin/ld: skipping incompatible /home/zhangyy/c2_local/lib/libupnp.so when sear ching for -lupnp


看这句话,我猜测是“skipping incompatible”这个出问题了,你的动态库和你现在的gcc不是同一个版本的。
bww1228 2010-07-29
  • 打赏
  • 举报
回复
不懂,,看看
hai040 2010-07-29
  • 打赏
  • 举报
回复
找不到upnp库
LIBS = -lupnp

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧