my_libnet.c:158: warning: implicit declaration of function `libnet_open_link_interface'
my_libnet.c:160: warning: implicit declaration of function `libnet_error'
my_libnet.c:181: warning: implicit declaration of function `libnet_init_packet'
my_libnet.c:258: warning: implicit declaration of function `libnet_write_link_layer'
my_libnet.c:274: warning: implicit declaration of function `libnet_close_link_interface'
my_libnet.c:283: warning: implicit declaration of function `libnet_destroy_packet'
/tmp/ccj9SDyx.o(.text+0x22d): In function `my_callback':
: undefined reference to `libnet_open_link_interface'
/tmp/ccj9SDyx.o(.text+0x256): In function `my_callback':
: undefined reference to `libnet_error'
/tmp/ccj9SDyx.o(.text+0x28d): In function `my_callback':
: undefined reference to `libnet_init_packet'
/tmp/ccj9SDyx.o(.text+0x2a4): In function `my_callback':
: undefined reference to `libnet_error'
/tmp/ccj9SDyx.o(.text+0x447): In function `my_callback':
: undefined reference to `libnet_error'
/tmp/ccj9SDyx.o(.text+0x463): In function `my_callback':
: undefined reference to `libnet_write_link_layer'
/tmp/ccj9SDyx.o(.text+0x4b4): In function `my_callback':
: undefined reference to `libnet_close_link_interface'
/tmp/ccj9SDyx.o(.text+0x4cb): In function `my_callback':
: undefined reference to `libnet_error'
/tmp/ccj9SDyx.o(.text+0x4dd): In function `my_callback':
: undefined reference to `libnet_destroy_packet'
collect2: ld returned 1 exit status作者: lenovo 时间: 2006-11-28 10:05
没找到你的libnet头文件和库文件。作者: zgx120106 时间: 2006-11-28 10:46
可即使编译加上-I/usr/include/libnet -L/usr/libs 效果还是一样的啊
(所指定的位置肯定有头文件和库文件)作者: jacksting 时间: 2006-11-28 11:09
libnet不是系统自带和默认的。需要去网上下载。是用来发送数据包的库,就像libpcap是截获数据包的库一样。作者: jacksting 时间: 2006-11-28 11:10
如果不行,就重新编译安装试试。在/etc/ld.so.conf中加入你的路径,然后/sbin/ldconfig试试。作者: zgx120106 时间: 2006-11-28 13:01
可是好象没有libnet.so这种文件,只有一个静态库libnet.a文件