pynetwork / pypcap

pypcap - python libpcap module, forked from code.google.com/p/pypcap
Other
297 stars 74 forks source link

Error C1189 was occurred during the installing seems like have something with VC++ linker #92

Closed CodingDogzxg closed 5 years ago

CodingDogzxg commented 5 years ago

D:\python\pypcap-python3.7>python setup.py install Found pcap headers in D:\python\include\pcap.h Found libraries in D:\python\lib\wpcap.lib found pcap_setdirection found pcap_setnonblock found pcap_compile_nopcap function running install running bdist_egg running egg_info writing pypcap.egg-info\PKG-INFO writing dependency_links to pypcap.egg-info\dependency_links.txt writing top-level names to pypcap.egg-info\top_level.txt reading manifest file 'pypcap.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pypcap.egg-info\SOURCES.txt' installing library code to build\bdist.win32\egg running install_lib running build_ext building 'pcap' extension D:\visualstudio\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_PCAP_SETDIRECTION=1 -DHAVE_PCAP_SETNONBLOCK=1 -DHAVE_PCAP_COMPILE_NOPCAP=1 -ID:\python\include -ID:\python\include -ID:\python\include -ID:\visualstudio\VC\Tools\MSVC\14.16.27023\include "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpcap.c /Fobuild\temp.win32-3.7\Release\pcap.obj -DWIN32 -DWPCAP -D_CRT_SECURE_NO_WARNINGS pcap.c pcap.c(3739): warning C4013: “pcap_create”Undefined; assume that an int is returned externally pcap.c(3739): warning C4047: “=”:“pcap_t *”Unlike the indirect level of "int" pcap.c(3770): warning C4013: “pcap_set_snaplen”Undefined; assume that an int is returned externally pcap.c(3785): warning C4013: “pcap_set_promisc”Undefined; assume that an int is returned externally pcap.c(3800): warning C4013: “pcap_set_timeout”Undefined; assume that an int is returned externally pcap.c(3815): warning C4013: “pcap_set_immediate_mode”Undefined; assume that an int is returned externally pcap.c(3830): warning C4013: “pcap_set_rfmon”Undefined; assume that an int is returned externally pcap.c(3857): warning C4013: “pcap_activate”Undefined; assume that an int is returned externally D:\visualstudio\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_PCAP_SETDIRECTION=1 -DHAVE_PCAP_SETNONBLOCK=1 -DHAVE_PCAP_COMPILE_NOPCAP=1 -ID:\python\include -ID:\python\include -ID:\python\include -ID:\visualstudio\VC\Tools\MSVC\14.16.27023\include "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpcap_ex.c /Fobuild\temp.win32-3.7\Release\pcap_ex.obj -DWIN32 -DWPCAP -D_CRT_SECURE_NO_WARNINGS pcap_ex.c C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1423): warning C4005: “vsnprintf”: Macro redefinition D:\python\include\pcap-stdinc.h(64): note: See the previous definition of "vsnprintf" C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1425): fatal error C1189: #error: Macro definition of vsnprintf conflicts with Standard Library function declaration error: command 'D:\visualstudio\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.exe' failed with exit status 2

hellais commented 5 years ago

Oh my. I guess the key here is:

C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h(1425): fatal error C1189: #error: Macro definition of vsnprintf conflicts with Standard Library function declaration

My windows knowledge is very limited so I don't know what may be causing this.

CodingDogzxg commented 5 years ago

never mind, thanks for ur attention and the comment u left for me. I will close this issue, cuz I found another way to solve my problems without pypcap.