[Winpcap-users] including pcap.h fails build

Gianluca Varenni gianluca.varenni at cacetech.com
Tue Jul 28 08:25:46 PDT 2009


What is the content of line 215 in main.cpp, line 240 of main.cpp and line 
93 of net_bucket.h?

Have a nice day
GV


----- Original Message ----- 
From: "Andrej van der Zee" <andrejvanderzee at gmail.com>
To: <winpcap-users at winpcap.org>
Sent: Tuesday, July 28, 2009 2:09 AM
Subject: [Winpcap-users] including pcap.h fails build


> Hi,
>
> I am trying to port my C++ Linux application that uses very basic
> features of libpcap. I am trying to compile this on Windows, but I
> keep getting into weird trouble that is maybe caused by my lack of
> understanding of Windows. But it only happen when I include "pcap.h"
> and define WIN32. Anyway, these are the errors:
>
> main.cpp
> main.cpp(215) : error C2332: 'struct' : missing tag name
> main.cpp(215) : error C2039: '<unnamed-tag>' : is not a member of 
> 'net_buckets'
> 
> c:\cygwin\home\andrej\mbrace\trunk\parsers\cap2net\../core/net_bucket.h(93)
> : see declaration of 'net_buckets'
> main.cpp(215) : error C2274: 'function-style cast' : illegal as right
> side of '.' operator
> main.cpp(240) : error C2332: 'struct' : missing tag name
> main.cpp(240) : error C2039: '<unnamed-tag>' : is not a member of 
> 'net_buckets'
> 
> c:\cygwin\home\andrej\mbrace\trunk\parsers\cap2net\../core/net_bucket.h(93)
> : see declaration of 'net_buckets'
> main.cpp(240) : error C2274: 'function-style cast' : illegal as right
> side of '.' operator
> main.cpp(246) : error C2332: 'struct' : missing tag name
> main.cpp(246) : error C2039: '<unnamed-tag>' : is not a member of 
> 'net_buckets'
> 
> c:\cygwin\home\andrej\mbrace\trunk\parsers\cap2net\../core/net_bucket.h(93)
> : see declaration of 'net_buckets'
> main.cpp(246) : error C2274: 'function-style cast' : illegal as right
> side of '.' operator
> main.cpp(256) : error C2332: 'struct' : missing tag name
> main.cpp(256) : error C2039: '<unnamed-tag>' : is not a member of 
> 'net_buckets'
> 
> c:\cygwin\home\andrej\mbrace\trunk\parsers\cap2net\../core/net_bucket.h(93)
> : see declaration of 'net_buckets'
> main.cpp(256) : error C2274: 'function-style cast' : illegal as right
> side of '.' operator
>
> Removing the #include for "pcap.h" makes this issue go away. I
> searched the error number but it seems not to be applicable to my
> case.
>
> I was hoping somebody could help me.
>
> Best regards,
> Andrej
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users 



More information about the Winpcap-users mailing list