est / pypcap

Automatically exported from code.google.com/p/pypcap
Other
0 stars 0 forks source link

Building under Windows gets error #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
d:\projects\pypcap>mingw32-make
python setup.py config --with-pcap=c:\\wpdpack
running config
found {'libraries': ['wpcap', 'iphlpapi'], 'library_dirs': ['c:\\wpdpack\\lib'],
 'extra_compile_args': ['-DWIN32', '-DWPCAP'], 'include_dirs': ['c:\\wpdpack\\in
clude/pcap']}
python setup.py build
running build
running build_ext
building 'pcap' extension
c:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\wpdpack\include/pcap -Ic:\P
ython26\include -Ic:\Python26\PC -c pcap.c -o build\temp.win32-2.6\Release\pcap.
o -DWIN32 -DWPCAP
In file included from pcap.c:30:0:
c:\wpdpack\include/pcap/pcap.h:41:27: fatal error: pcap-stdinc.h: No such file o
r directory
compilation terminated.
error: command 'gcc' failed with exit status 1
mingw32-make: *** [all] Error 1

I think problem with wrong 'include_dirs': ['c:\\wpdpack\\include/pcap']

Original issue reported on code.google.com by andreev....@gmail.com on 15 Sep 2010 at 1:12

GoogleCodeExporter commented 9 years ago
I used lastest code from svn.

Original comment by andreev....@gmail.com on 15 Sep 2010 at 1:13

GoogleCodeExporter commented 9 years ago
I have compiled the lastest code correctly. the step is:
1)get mingw gcc and pyrex and wpdpack to ready
2)modify the makefile as install file has said.
3)convert pythonXX.dll to libpythonXX.a
4)mingw-make and it will generate the pcap.pyd
maybe you can change the wpdpack version. version 3.1 is ok for me

Original comment by xueyaos...@gmail.com on 14 Oct 2010 at 6:13

GoogleCodeExporter commented 9 years ago
I used lastest wdpack version: 4.1.2

Original comment by andreev....@gmail.com on 16 Oct 2010 at 6:37

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I followed the steps given by xueyaoshun, but I still encounter the same 
problem as andreev.artem. Has anybody been able to fix that problem?

Original comment by s.sanad...@gmail.com on 11 Jan 2011 at 11:15

GoogleCodeExporter commented 9 years ago
that my pcap build,with winpcap 4.1.0. for py2.7-win32 windows 7

Original comment by 1000...@gmail.com on 9 Nov 2011 at 4:51

Attachments:

GoogleCodeExporter commented 9 years ago
you posted the line
c:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\wpdpack\include/pcap -Ic:\P
ython26\include -Ic:\Python26\PC -c pcap.c -o build\temp.win32-2.6\Release\pcap.
o -DWIN32 -DWPCAP

as I retried the line manually it worked.
Copy and paste the last failing line and it compiles to pyd.

Original comment by niccokun...@googlemail.com on 22 Nov 2011 at 12:43

GoogleCodeExporter commented 9 years ago
I had the same problem with the trunk from SVN. Fixed by changing setup.py:45 
from

for sd in ('include/pcap', 'include', ''):

to

for sd in ('include', 'include', ''):

Original comment by ajwlu...@gmail.com on 19 Mar 2012 at 4:55