[Winpcap-users] I can't compiled the example come with the
WpdPack_4_0.zip
欧福瑞
all_is_free at hotmail.com
Mon Mar 19 08:43:23 GMT 2007
I use Dev-C++ try to compile the example pcap_filter as a C projec and got failed:
make.exe -f "D:\FJK\pcap_filter\Makefile.win" allgcc.exe -c pcap_filter.c -o pcap_filter.o -I"D:/FJK/Dev-Cpp/include" -I"D:/FJK/Dev-Cpp/include/winpcap"
In file included from D:/FJK/Dev-Cpp/include/winpcap/pcap-stdinc.h:52, from D:/FJK/Dev-Cpp/include/winpcap/pcap.h:41, from pcap_filter.c:38:D:/FJK/Dev-Cpp/include/winpcap/bittypes.h:36: error: redefinition of typedef 'int8_t'D:/FJK/Dev-Cpp/include/stdint.h:27: error: previous declaration of 'int8_t' was hereD:/FJK/Dev-Cpp/include/winpcap/bittypes.h:52: error: redefinition of typedef 'int16_t'D:/FJK/Dev-Cpp/include/stdint.h:29: error: previous declaration of 'int16_t' was hereD:/FJK/Dev-Cpp/include/winpcap/bittypes.h:71: error: redefinition of typedef 'int32_t'D:/FJK/Dev-Cpp/include/stdint.h:31: error: previous declaration of 'int32_t' was here
make.exe: *** [pcap_filter.o] Error 1
If I compiled it as a C++ project, the error info is:
make.exe -f "D:\FJK\pcap_filter\Makefile.win" allg++.exe -c pcap_filter.c -o pcap_filter.o -I"D:/FJK/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"D:/FJK/Dev-Cpp/include/c++/3.4.2/backward" -I"D:/FJK/Dev-Cpp/include/c++/3.4.2/mingw32" -I"D:/FJK/Dev-Cpp/include/c++/3.4.2" -I"D:/FJK/Dev-Cpp/include" -I"D:/FJK/Dev-Cpp/include/winpcap"
g++.exe pcap_filter.o -o "Pcap_filter.exe" -L"D:/FJK/Dev-Cpp/lib" -L"D:/FJK/Dev-Cpp/lib/winpcap"
pcap_filter.o(.text+0x155):pcap_filter.c: undefined reference to `pcap_open_live'pcap_filter.o(.text+0x1d2):pcap_filter.c: undefined reference to `pcap_compile'pcap_filter.o(.text+0x1f9):pcap_filter.c: undefined reference to `pcap_close'pcap_filter.o(.text+0x21d):pcap_filter.c: undefined reference to `pcap_setfilter'pcap_filter.o(.text+0x244):pcap_filter.c: undefined reference to `pcap_close'pcap_filter.o(.text+0x271):pcap_filter.c: undefined reference to `pcap_dump_open'pcap_filter.o(.text+0x2a3):pcap_filter.c: undefined reference to `pcap_close'pcap_filter.o(.text+0x2d6):pcap_filter.c: undefined reference to `pcap_next_ex'pcap_filter.o(.text+0x312):pcap_filter.c: undefined reference to `pcap_dump'pcap_filter.o(.text+0x31f):pcap_filter.c: undefined reference to `pcap_close'pcap_filter.o(.text+0x32d):pcap_filter.c: undefined reference to `pcap_dump_close'collect2: ld returned 1 exit status
make.exe: *** [Pcap_filter.exe] Error 1
sorry for the stupid questions: is it a C or C++ project? howto resolve the problems?
_________________________________________________________________
通过 Live.com 查看资讯、娱乐信息和您关心的其他信息!
http://www.live.com/getstarted.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20070319/4ad173f7/attachment.htm
More information about the Winpcap-users
mailing list