วันอังคาร, กรกฎาคม 06, 2547

วันนี้ลองใช้ library libpcap แล้ว capture packet ซักนิดนึง compile ผ่าน แต่ link ไม่ผ่าน...ก็เรย
ถามแกอีก...

| This source(which is attached) can be compiled but why does it
| can't link with the linker?
|
| an error message is something like this...
|
| /tmp/cc21UrBO.o(.text+0x1d): In function `main':
| : undefined reference to `pcap_lookupdev'
| /tmp/cc21UrBO.o(.text+0x84): In function `main':
| : undefined reference to `pcap_lookupnet'

How did you attempt to link it? And do you have libpcap on your
system (I would assume you probably do, most systems do these days,
but you should check).

The usual method to link a libpcap program would be something like

cc -o xxx xxx.c [yyy.c zzz.c] -lpcap

If you have problems with things like that, you need to send me the
commands you're using, as well as the source file.

kre

พอลอง compile แบบนี้ก็รู้ว่าลืมใส่ -lpcap option ซะนี่..โง่มั้ยล่ะ..คนเรานะ...
ก็เลย thank แกไป...

เลย Memphis อีกตัว...ให้แกลองไปดู...แต่แกบอกขอศึกษาซักนิดนึง...เด๋วบอกให้พรุ่งนี้...

แล้วค่อยมาดูกัน...

ไม่มีความคิดเห็น: