From: Brian Manning
> On Mon, May 24, 2010 at 3:51 PM, Bob McConnell <
r...@cbord.com> wrote:
>> From: Brian Manning
>>> Did you check the README file for Net::Pcap?
>>>
>>>
http://cpansearch.perl.org/src/SAPER/Net-Pcap-0.16/README
>>>
>>> Hint: You add flags when you execute 'perl Makefile.PL'.
>>
>> I hadn't seen that file, and I don't enter that line, I entered
> 'cpan Net::Pcap' to get that far and I don't believe that will
> accept any flags. Would there be a problem with Wireshark and its
> WinPcap already installed?
>
> I think compiling Net::Pcap will work if you specify the
> library/header directories as per the README file. Note that if you
> have any spaces in your paths, you're going to have to do funny things
> with quotes to make both the cmd.exe shell and Perl happy.
>
> It might be easier to copy the WinPcap files into the Camelbox tree,
> libraries in C:\Camelbox\bin and header files in to
> C:\Camelbox\include. But I'll let you make that choice.
I tried copying those files, but still no joy. Unless I messed up the
parameters. I have tried several variations for both paths, but can't
find anything that works. This version produces the fewest errors, but
it looks like there are several pieces still missing. Sorry about the
broken lines, but this is running in a basic 80x24 DOS window.
-----8<---------------------------------------------------------
C:\camelbox\.cpan\build\Net-Pcap-0.16-SEnu84>perl Makefile.pl
INC=-IC:/camelbox/
include/pcap LIBS="-LC:/camelbox/lib -llibwpcap"
socket.h patched... ok
looking for -lwpcap... yes
checking for pcap_lib_version() in -lwpcap... yes
detecting available functions... ok
Note (probably harmless): No library found for -lmsvcrt
Note (probably harmless): No library found for -lmoldname
Note (probably harmless): No library found for -lkernel32
Note (probably harmless): No library found for -luser32
Note (probably harmless): No library found for -lgdi32
Note (probably harmless): No library found for -lwinspool
Note (probably harmless): No library found for -lcomdlg32
Note (probably harmless): No library found for -ladvapi32
Note (probably harmless): No library found for -lshell32
Note (probably harmless): No library found for -lole32
Note (probably harmless): No library found for -loleaut32
Note (probably harmless): No library found for -lnetapi32
Note (probably harmless): No library found for -luuid
Note (probably harmless): No library found for -lws2_32
Note (probably harmless): No library found for -lmpr
Note (probably harmless): No library found for -lwinmm
Note (probably harmless): No library found for -lversion
Note (probably harmless): No library found for -lodbc32
Note (probably harmless): No library found for -lodbccp32
Writing Makefile for Net::Pcap
C:\camelbox\.cpan\build\Net-Pcap-0.16-SEnu84>dmake
gcc -c -IC:/camelbox/include/pcap -s -O2 -DWIN32 -DHAVE_DES_FCRYPT
-DPERL_
IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing
-DPERL_MSVCRT_READFIX
-s -O2 -DVERSION=\"0.16\" -DXS_VERSION=\"0.16\"
"-IC:\camelbox\lib\CORE"
-DWINSOCK2_H_REQUESTED -DWPCAP -DHAVE_REMOTE -DHAVE_BLANK
-DHAVE_PCAP_LIB_VERSI
ON Pcap.c
In file included from Pcap.xs:43:
stubs.inc:85:2: warning: #warning "the function pcap_findalldevs() is
not availa
ble, but will be emulated"
In file included from Pcap.xs:43:
stubs.inc:90: error: redefinition of typedef 'pcap_if_t'
C:/camelbox/include/pcap/pcap.h:89: error: previous declaration of
'pcap_if_t' w
as here
stubs.inc:91: error: redefinition of `struct pcap_if'
stubs.inc:113:2: warning: #warning "the function pcap_breakloop() is not
availab
le"
stubs.inc:127:2: warning: #warning "the function pcap_setnonblock() is
not avail
able"
stubs.inc:142:2: warning: #warning "the function pcap_getnonblock() is
not avail
able"
stubs.inc:157:2: warning: #warning "the function pcap_dump_file() is not
availab
le"
stubs.inc:172:2: warning: #warning "the function pcap_dump_flush() is
not availa
ble"
stubs.inc:187:2: warning: #warning "the function pcap_list_datalinks()
is not av
ailable"
stubs.inc:202:2: warning: #warning "the function pcap_set_datalink() is
not avai
lable"
stubs.inc:217:2: warning: #warning "the function
pcap_datalink_name_to_val() is
not available"
stubs.inc:232:2: warning: #warning "the function
pcap_datalink_val_to_name() is
not available"
stubs.inc:247:2: warning: #warning "the function
pcap_datalink_val_to_descriptio
n() is not available"
stubs.inc:262:2: warning: #warning "the function pcap_compile_nopcap()
is not av
ailable"
stubs.inc:267: error: conflicting types for 'pcap_compile_nopcap'
C:/camelbox/include/pcap/pcap.h:319: error: previous declaration of
'pcap_compil
e_nopcap' was here
stubs.inc:267: error: conflicting types for 'pcap_compile_nopcap'
C:/camelbox/include/pcap/pcap.h:319: error: previous declaration of
'pcap_compil
e_nopcap' was here
stubs.inc:277:2: warning: #warning "the function
pcap_get_selectable_fd() is not
available"
stubs.inc:292:2: warning: #warning "the function pcap_next_ex() is not
available
"
stubs.inc:307:2: warning: #warning "the function pcap_sendpacket() is
not availa
ble"
stubs.inc:322:2: warning: #warning "the function pcap_createsrcstr() is
not avai
lable"
stubs.inc:337:2: warning: #warning "the function pcap_parsesrcstr() is
not avail
able"
stubs.inc:352:2: warning: #warning "the function pcap_open() is not
available"
stubs.inc:357: error: redefinition of `struct pcap_rmtauth'
stubs.inc:373:2: warning: #warning "the function pcap_setbuff() is not
available
"
stubs.inc:388:2: warning: #warning "the function pcap_setuserbuffer() is
not ava
ilable"
stubs.inc:403:2: warning: #warning "the function pcap_setmode() is not
available
"
stubs.inc:418:2: warning: #warning "the function pcap_setmintocopy() is
not avai
lable"
stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc()
is not a
vailable"
stubs.inc:438: error: redefinition of `struct pcap_send_queue'
stubs.inc:455:2: warning: #warning "the function
pcap_sendqueue_destroy() is not
available"
stubs.inc:469:2: warning: #warning "the function pcap_sendqueue_queue()
is not a
vailable"
stubs.inc:484:2: warning: #warning "the function
pcap_sendqueue_transmit() is no
t available"
stubs.inc:499:2: warning: #warning "the function pcap_event() is not
available"
stubs.inc:514:2: warning: #warning "the function pcap_setsampling() is
not avail
able"
stubs.inc:519: error: redefinition of `struct pcap_samp'
Pcap.c: In function `XS_Net__Pcap_strerror':
Pcap.c:1572: warning: assignment discards qualifiers from pointer target
type
dmake: Error code 129, while making 'Pcap.o'