Re: WinPCap Problems
- From: "Skywing" <skywing_NO_SPAM_@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 17 Jun 2006 09:57:06 -0400
Sounds like this is expecting to be compiled as C++ and not plain C.
<shell6@xxxxxxxxx> wrote in message
news:1150517149.191793.42740@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am starting a project for an internship off on a bad foot. I need to
use WinPCap for my program and even after including pcap.h, I am
getting errors that things are undefined. I completely followed the
tutorial source in the documentation too!
Compiling...
main.c
C:\Documents and Settings\root\My Documents\project\main.c(45) : error
C2143: syntax error : missing ';' before 'type'
C:\Documents and Settings\root\My Documents\project\main.c(46) : error
C2143: syntax error : missing ';' before 'type'
C:\Documents and Settings\root\My Documents\project\main.c(48) : error
C2065: 'captime' : undeclared identifier
C:\Documents and Settings\root\My Documents\project\main.c(48) :
warning C4047: '=' : 'int ' differs in levels of indirection from
'struct tm *'
C:\Documents and Settings\root\My Documents\project\main.c(49) : error
C2065: 'timestr' : undeclared identifier
C:\Documents and Settings\root\My Documents\project\main.c(49) :
warning C4047: 'function' : 'char *' differs in levels of indirection
from 'int '
C:\Documents and Settings\root\My Documents\project\main.c(49) :
warning C4024: 'strftime' : different types for formal and actual
parameter 1
C:\Documents and Settings\root\My Documents\project\main.c(49) :
warning C4047: 'function' : 'const struct tm *' differs in levels of
indirection from 'int '
C:\Documents and Settings\root\My Documents\project\main.c(49) :
warning C4024: 'strftime' : different types for formal and actual
parameter 4
C:\Documents and Settings\root\My Documents\project\main.c(67) :
warning C4013: 'pcap_findalldevs_ex' undefined; assuming extern
returning int
C:\Documents and Settings\root\My Documents\project\main.c(67) : error
C2065: 'PCAP_SRC_IF_STRING' : undeclared identifier
C:\Documents and Settings\root\My Documents\project\main.c(88) : error
C2065: 'd' : undeclared identifier
C:\Documents and Settings\root\My Documents\project\main.c(88) : error
C2223: left of '->description' must point to struct/union
C:\Documents and Settings\root\My Documents\project\main.c(89) : error
C2223: left of '->description' must point to struct/union
C:\Documents and Settings\root\My Documents\project\main.c(94) : error
C2065: 'bool' : undeclared identifier
C:\Documents and Settings\root\My Documents\project\main.c(94) : error
C2146: syntax error : missing ';' before identifier 'go'
C:\Documents and Settings\root\My Documents\project\main.c(94) : error
C2065: 'go' : undeclared identifier
C:\Documents and Settings\root\My Documents\project\main.c(94) : error
C2065: 'false' : undeclared identifier
C:\Documents and Settings\root\My Documents\project\main.c(98) : error
C2065: 'cin' : undeclared identifier
C:\Documents and Settings\root\My Documents\project\main.c(98) :
warning C4552: '>>' : operator has no effect; expected operator with
side-effect
C:\Documents and Settings\root\My Documents\project\main.c(103) : error
C2065: 'true' : undeclared identifier
C:\Documents and Settings\root\My Documents\project\main.c(106) :
warning C4552: '<' : operator has no effect; expected operator with
side-effect
C:\Documents and Settings\root\My Documents\project\main.c(106) : error
C2143: syntax error : missing ')' before ';'
C:\Documents and Settings\root\My Documents\project\main.c(106) : error
C2059: syntax error : ')'
C:\Documents and Settings\root\My Documents\project\main.c(109) :
warning C4013: 'pcap_open' undefined; assuming extern returning int
C:\Documents and Settings\root\My Documents\project\main.c(109) : error
C2065: 'PCAP_OPENFLAG_PROMISCUOUS' : undeclared identifier
C:\Documents and Settings\root\My Documents\project\main.c(109) :
warning C4047: '=' : 'struct pcap *' differs in levels of indirection
from 'int '
Error executing cl.exe.
Here is my include chain:
#include <pcap.h> // pcap functions
#include <iostream.h> // basic io
#include <fstream.h> // file io
#include <string.h> // string funcs
Am I doing something wrong? I placed all of the include files in VC's
include file too....
Thanks.
.
- Follow-Ups:
- Re: WinPCap Problems
- From: shell6
- Re: WinPCap Problems
- References:
- WinPCap Problems
- From: shell6
- WinPCap Problems
- Prev by Date: WinPCap Problems
- Next by Date: Re: WinPCap Problems
- Previous by thread: WinPCap Problems
- Next by thread: Re: WinPCap Problems
- Index(es):
Relevant Pages
|