Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Trouble installing Net::Pcap on Win32

by NetWallah (Abbot)
on May 14, 2003 at 05:08 UTC ( #257973=perlquestion: print w/ replies, xml ) Need Help??
NetWallah has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, Wise monks - I seek your wisdom, and tolerance for my choice of the Windoze platform for this module. Not being a "c" programmer, many of these dont make sense, so I seek enlightenment. I'm attempting to install Net::Pcap verision 0.04. I have already installed WinPcap, and copied over the development pack. My C compiler is based on Visual Studio Dot Net. This part of the install was successful:
>perl Makefile.PL INC=-IE:\Progra~1\WinPcap\wpdpack\Include LIBS=-lE: +\Progra~1WinPcap\wpdpack\Lib -lpcap
However, the next part, running nmake gets these errors:
D:\Download\Programming\Perl\Net-Pcap-0.04>nmake Microsoft (R) Program Maintenance Utility Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. cl -c -IE:\Progra~1\WinPcap\wpdpack\Include -O1 -MD -DNDEBUG - +DWIN32 -D_ CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_I +MPLICIT_SY S -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG -DVERSION=\"0.04\" -DXS +_VERSION=\ "0.04\" -ID:\Perl\lib\CORE Pcap.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.00.9466 for +80x86 Copyright (C) Microsoft Corporation 1984-2001. All rights reserved. Pcap.c E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (109) : error C2011: 'fd_set' : 'struct' type redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(54) : see declaration of 'fd_set' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (144) : warning C4005: 'FD_SET' : macro redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(88) : see previous definition of 'FD_SET' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (153) : error C2011: 'timeval' : 'struct' type redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(97) : see declaration of 'timeval' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (209) : error C2011: 'hostent' : 'struct' type redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(153) : see declaration of 'hostent' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (222) : error C2011: 'netent' : 'struct' type redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(166) : see declaration of 'netent' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (229) : error C2011: 'servent' : 'struct' type redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(173) : see declaration of 'servent' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (241) : error C2011: 'protoent' : 'struct' type redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(185) : see declaration of 'protoent' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (327) : error C2011: 'in_addr' : 'struct' type redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(269) : see declaration of 'in_addr' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (385) : error C2011: 'sockaddr_in' : 'struct' type redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(319) : see declaration of 'sockaddr_in' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (395) : error C2011: 'WSAData' : 'struct' type redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(329) : see declaration of 'WSAData' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (455) : warning C4005: 'SO_DONTLINGER' : macro redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(409) : see previous definition of 'SO_DONTLINGER' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (512) : warning C4005: 'AF_IPX' : macro redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(467) : see previous definition of 'AF_IPX' E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ +WinSock2.h (540) : warning C4005: 'AF_MAX' : macro redefinition E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(486) : see previous definition of 'AF_MAX' .... ..... <Snip> .... E:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\ +Include\Wi nSock.h(360) : see previous definition of 'IP_DONTFRAGMENT' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\malloc.h(114 +) : error C2059: syntax error : '(' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\malloc.h(115 +) : error C2059: syntax error : '(' E:\Program Files\Microsoft Visual Studio .NET\Vc7\include\malloc.h(116 +) : error C2059: syntax error : '(' Pcap.c(714) : warning C4133: 'function' : incompatible types - from 'F +ILE *' to '_PerlIO *' NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop.
I'm hoping someone will spot something obvious and advise.

Comment on Trouble installing Net::Pcap on Win32
Select or Download Code
Re: Trouble installing Net::Pcap on Win32
by PodMaster (Abbot) on May 14, 2003 at 06:11 UTC
Re: Trouble installing Net::Pcap on Win32
by nite_man (Deacon) on May 14, 2003 at 06:28 UTC
    Try to look this node. To install Net::Pcap is not main problem. You should use WinPcap - an architecture for packet capture and network analysis for the Win32 platforms.
    Good luck!
          
    --------------------------------
    SV* sv_bless(SV* sv, HV* stash);
    
Re: Trouble installing Net::Pcap on Win32
by smitz (Chaplain) on May 14, 2003 at 07:38 UTC
    Simple solution, proven to work:
    Install WinPcap 3.0 from here
    Then, from a DOS prompt: ppm install http://www.bribes.org/perl/ppm/Net-Pcap.ppd

    Smitz

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://257973]
Approved by rob_au
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-10-01 23:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (41 votes), past polls