pcap 라이브러리를 사용해서 프로그램을 작성 하고 있습니다만..
컴파일시 에러가 납니다... 제가 보기엔 함수들을 참조 할수 없다는것 같은데 부탁 드립니
다. 컴파일시 gcc -o test test.c 하였고
#include<pcap.h> 이라인도 포함 했는데..
/usr/lib/pcap.h 파일도 열어서 확인 했는데
전부 존재 하는 함수 입니다.
컴파일시 옵션을 빠트린 건가요? 초보라서 어려움이 많네요... 부탁 드립니다.
에러 메세지는
tmp/cc45N3a0.o: In function `sig_int':
/tmp/cc45N3a0.o(.text+0xb64): undefined reference to `pcap_close'
/tmp/cc45N3a0.o: In function `main':
/tmp/cc45N3a0.o(.text+0xd6e): undefined reference to `pcap_lookupdev'
/tmp/cc45N3a0.o(.text+0xdd9): undefined reference to `pcap_open_live'
/tmp/cc45N3a0.o(.text+0xe14): undefined reference to `pcap_snapshot'
/tmp/cc45N3a0.o(.text+0xe67): undefined reference to `pcap_lookupnet'
/tmp/cc45N3a0.o(.text+0xec1): undefined reference to `pcap_compile'
/tmp/cc45N3a0.o(.text+0xef6): undefined reference to `pcap_setfilter'
/tmp/cc45N3a0.o(.text+0xf38): undefined reference to `pcap_datalink'
/tmp/cc45N3a0.o(.text+0xf6b): undefined reference to `pcap_loop'
/tmp/cc45N3a0.o(.text+0xf9a): undefined reference to `pcap_close'