To whom it may concern,

I am trying to use pcap and cannot seem to be able to get
any code to compile with #include<pcap.h>

I am getting the following errors from gcc and cannot, for the
life of me, figure out why.

prompt# g++ test2.cc -o test2
In file included from test2.cc:12:
/usr/local/include/net/bpf.h:408: previous declaration of 'u_int
bpf_filter (bpf_insn *, u_char *, unsigned int, unsigned int)' with C++
linkage
/usr/local/include/pcap.h:201: conflicts with new declaration with C
linkage
/usr/local/include/bpf.h:407: previous declaration of 'int
 bpf_validate (bpf_insn *, int)' with C++ linkage
/usr/local/include/pcap.h:202: conflicts with new declaration with C
linkage


I am using the following code:

#include <stdio.h>
#include <pcap.h>


int main(int argc, char * argv[])
{ 
  printf("done!\n");
}

With gcc version 2.96 running on Linux 2.4.10 (ReadHat 7.2)
libpcap version 0.7.1

Any help would be greatly appreciated,

Stephen Thompson
[EMAIL PROTECTED]

-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to