看个错误

PiaoXue19841209 2011-05-27 02:04:13
$./configure
......................................
.......................................

$ make
VER=`cat ./VERSION`; \
MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' ./VERSION`; \
gcc -shared -Wl,-soname,libpcap.so.$MAJOR_VER \
-o libpcap.so.$VER pcap-linux.o pcap-usb-linux.o pcap-can-linux.o fad-getad.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o sf-pcap.o sf-pcap-ng.o pcap-common.o bpf_image.o bpf_dump.o scanner.o grammar.o bpf_filter.o version.o
/usr/bin/ld: i386:x86-64 architecture of input file `pcap-linux.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `pcap-usb-linux.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `fad-getad.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `pcap.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `inet.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `gencode.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `optimize.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `nametoaddr.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `etherent.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `savefile.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `sf-pcap.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `sf-pcap-ng.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `pcap-common.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `bpf_image.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `bpf_dump.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `scanner.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `grammar.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `bpf_filter.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `version.o' is incompatible with i386 output
/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
make: *** [libpcap.so] 错误 1
...全文
358 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
我曾叫路人甲 2011-06-08
  • 打赏
  • 举报
回复
怎么解决的啊?我也遇到这个错误了 啊!我的QQ345000982
justkk 2011-05-27
  • 打赏
  • 举报
回复
貌似你那些.o文件是64位的
修改一下makefile中的gcc选项,添加-m64 试试看
PiaoXue19841209 2011-05-27
  • 打赏
  • 举报
回复
我新手,不过别人说我的这个好像可以编译64位?
$ uname -a
Linux 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
freetstar 2011-05-27
  • 打赏
  • 举报
回复
你的是32位机器编译的64位源码吧

23,121

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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