Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Adding libpcap includes and library

I have been searching for a solution all night. I have RTFM and searched Google numerous times, although, I can't seem to get this right. I am attempting to use libpcap to display network interface info. I have read that I may have not linked against the libraries correctly... I am just learning cpp so I may have done something really stupid, any help will be appriciated. Additionally I anyone knows of a book for cpp that focuses on using eclipse I would enjoy hearing about it. Thnaks in advance.

$ whereis libpcap
libpcap: /usr/lib/libpcap.a /usr/lib/libpcap.so

$ aptitude search libpcap | grep "i "
i   libpcap0.8                      - System interface for user-level packet cap
i   libpcap0.8-dev                  - Development library and header files for l

[eclipse]
g++ -L/usr/lib -o"sNAP"  ./main.o  
./main.o: In function `main':
/home/ofanged1/workspace/sNAP/Debug/../main.cpp:6: undefined reference to `pcap_lookupdev'
collect2: ld returned 1 exit status
make: *** [sNAP] Error 1

--
Frank DiRocco

Back to the top