WinPCap Problems
- From: shell6@xxxxxxxxx
- Date: 16 Jun 2006 21:05:49 -0700
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: Skywing
- Re: WinPCap Problems
- Prev by Date: GetQueuedCompletionStatusEx - How to distinguish between successful and failed I/O operation?
- Next by Date: Re: WinPCap Problems
- Previous by thread: GetQueuedCompletionStatusEx - How to distinguish between successful and failed I/O operation?
- Next by thread: Re: WinPCap Problems
- Index(es):
Relevant Pages
|