Open kouzhudong opened 6 months ago
@kouzhudong Unfortunately I don't understand Chinese. Is it possible to compile it in English?
Rebuild started...
1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Debug x64 ------
1>1>Checking Build System
2>------ Rebuild All started: Project: Common++, Configuration: Debug x64 ------
3>------ Rebuild All started: Project: hash-library, Configuration: Debug x64 ------
4>------ Rebuild All started: Project: light_pcapng, Configuration: Debug x64 ------
5>------ Rebuild All started: Project: memplumber, Configuration: Debug x64 ------
6>------ Skipped Rebuild All: Project: Experimental, Configuration: Debug x64 ------
6>Project not selected to build for this solution configuration
7>------ Skipped Rebuild All: Project: Continuous, Configuration: Debug x64 ------
7>Project not selected to build for this solution configuration
8>------ Skipped Rebuild All: Project: NightlyMemoryCheck, Configuration: Debug x64 ------
8>Project not selected to build for this solution configuration
9>------ Skipped Rebuild All: Project: RUN_TESTS, Configuration: Debug x64 ------
9>Project not selected to build for this solution configuration
10>------ Skipped Rebuild All: Project: Nightly, Configuration: Debug x64 ------
10>Project not selected to build for this solution configuration
11>------ Skipped Rebuild All: Project: uninstall, Configuration: Debug x64 ------
11>Project not selected to build for this solution configuration
5>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/3rdParty/MemPlumber/MemPlumber/CMakeLists.txt
4>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/3rdParty/LightPcapNg/CMakeLists.txt
2>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Common++/CMakeLists.txt
3>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/3rdParty/hash-library/CMakeLists.txt
5>memplumber.cpp
4>light_advanced.c
2>GeneralUtils.cpp
3>md5.cpp
4>light_alloc.c
4>light_compression.c
4>light_internal.c
4>light_io.c
4>D:\git\gitlab\code\library\lib\src\PcapPlusPlus\PcapPlusPlus\3rdParty\LightPcapNg\LightPcapNg\src\light_io.c(91,56): warning C4133: '=': incompatible types - from 'light_file' to 'FILE *'
4>D:\git\gitlab\code\library\lib\src\PcapPlusPlus\PcapPlusPlus\3rdParty\LightPcapNg\LightPcapNg\src\light_io.c(117,34): warning C4133: 'function': incompatible types - from 'FILE *' to 'light_file'
4>D:\git\gitlab\code\library\lib\src\PcapPlusPlus\PcapPlusPlus\3rdParty\LightPcapNg\LightPcapNg\src\light_io.c(118,32): warning C4133: 'function': incompatible types - from 'FILE *' to 'light_file'
4>D:\git\gitlab\code\library\lib\src\PcapPlusPlus\PcapPlusPlus\3rdParty\LightPcapNg\LightPcapNg\src\light_io.c(132,34): warning C4133: 'function': incompatible types - from 'FILE *' to 'light_file'
4>D:\git\gitlab\code\library\lib\src\PcapPlusPlus\PcapPlusPlus\3rdParty\LightPcapNg\LightPcapNg\src\light_io.c(155,31): warning C4133: 'function': incompatible types - from 'FILE *' to 'light_file'
4>light_manipulate.c
4>light_null_compression.c
4>light_option.c
5>memplumber.vcxproj -> D:\git\gitlab\code\library\lib\src\PcapPlusPlus\build\dll\3rdParty\MemPlumber\MemPlumber\Debug\memplumber.dll
4>light_pcapng_cont.c
4>light_pcapng_ext.c
2>IpAddress.cpp
4>light_pcapng.c
4>light_platform.c
3>hash-library.vcxproj -> D:\git\gitlab\code\library\lib\src\PcapPlusPlus\build\dll\3rdParty\hash-library\hash-library.dir\Debug\hash-library.lib
4>light_zstd_compression.c
4>Generating Code...
4>light_pcapng.vcxproj -> D:\git\gitlab\code\library\lib\src\PcapPlusPlus\build\dll\3rdParty\LightPcapNg\light_pcapng.dir\Debug\light_pcapng.lib
4>Done building project "light_pcapng.vcxproj".
2>IpUtils.cpp
2>Logger.cpp
2>MacAddress.cpp
2>OUILookup.cpp
2>PcapPlusPlusVersion.cpp
2>SystemUtils.cpp
2>TablePrinter.cpp
2>Generating Code...
2>Common++.vcxproj -> D:\git\gitlab\code\library\lib\src\PcapPlusPlus\build\dll\Common++\Debug\Common++.dll
12>------ Rebuild All started: Project: Packet++, Configuration: Debug x64 ------
12>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Packet++/CMakeLists.txt
12>ArpLayer.cpp
12>Asn1Codec.cpp
12>BgpLayer.cpp
12>CotpLayer.cpp
12>DhcpLayer.cpp
12>DhcpV6Layer.cpp
12>DnsLayer.cpp
12>DnsResource.cpp
12>DnsResourceData.cpp
12>EthDot3Layer.cpp
12>EthLayer.cpp
12>FtpLayer.cpp
12>GreLayer.cpp
12>GtpLayer.cpp
12>HttpLayer.cpp
12>IcmpLayer.cpp
12>IcmpV6Layer.cpp
12>IgmpLayer.cpp
12>IPReassembly.cpp
12>IPSecLayer.cpp
12>Generating Code...
12>Compiling...
12>IPv4Layer.cpp
12>IPv6Extensions.cpp
12>IPv6Layer.cpp
12>Layer.cpp
12>LLCLayer.cpp
12>MplsLayer.cpp
12>NdpLayer.cpp
12>NflogLayer.cpp
12>NtpLayer.cpp
12>NullLoopbackLayer.cpp
12>Packet.cpp
12>PacketTrailerLayer.cpp
12>PacketUtils.cpp
12>PayloadLayer.cpp
12>PPPoELayer.cpp
12>RadiusLayer.cpp
12>RawPacket.cpp
12>S7CommLayer.cpp
12>SdpLayer.cpp
12>SingleCommandTextProtocol.cpp
12>Generating Code...
12>Compiling...
12>SipLayer.cpp
12>Sll2Layer.cpp
12>SllLayer.cpp
12>SmtpLayer.cpp
12>SomeIpLayer.cpp
12>SomeIpSdLayer.cpp
12>SSHLayer.cpp
12>SSLCommon.cpp
12>SSLHandshake.cpp
12>SSLLayer.cpp
12>StpLayer.cpp
12>TcpLayer.cpp
12>TcpReassembly.cpp
12>TelnetLayer.cpp
12>TextBasedProtocol.cpp
12>TLVData.cpp
12>TpktLayer.cpp
12>UdpLayer.cpp
12>VlanLayer.cpp
12>VrrpLayer.cpp
12>Generating Code...
12>Compiling...
12>VxlanLayer.cpp
12>WakeOnLanLayer.cpp
12>Generating Code...
12>LINK : fatal error LNK1104: cannot open file '..\Common++\Debug\Common++.lib'
12>Done building project "Packet++.vcxproj" -- FAILED.
13>------ Rebuild All started: Project: Pcap++, Configuration: Debug x64 ------
14>------ Rebuild All started: Project: Packet++Test, Configuration: Debug x64 ------
14>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Tests/Packet++Test/CMakeLists.txt
13>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Pcap++/CMakeLists.txt
13>NetworkUtils.cpp
14>main.cpp
13>PcapFileDevice.cpp
14>Asn1Tests.cpp
13>PcapDevice.cpp
14>BgpTests.cpp
13>PcapFilter.cpp
13>PcapLiveDevice.cpp
14>CotpTests.cpp
13>PcapLiveDeviceList.cpp
14>DhcpTests.cpp
13>PcapRemoteDevice.cpp
14>DhcpV6Tests.cpp
13>PcapRemoteDeviceList.cpp
14>DnsTests.cpp
13>RawSocketDevice.cpp
13>WinPcapLiveDevice.cpp
14>EthAndArpTests.cpp
13>Generating Code...
13>LINK : fatal error LNK1104: cannot open file '..\Packet++\Debug\Packet++.lib'
13>Done building project "Pcap++.vcxproj" -- FAILED.
15>------ Rebuild All started: Project: ArpSpoofing, Configuration: Debug x64 ------
16>------ Rebuild All started: Project: Arping, Configuration: Debug x64 ------
17>------ Rebuild All started: Project: PcapSearch, Configuration: Debug x64 ------
18>------ Rebuild All started: Project: DNSResolver, Configuration: Debug x64 ------
19>------ Rebuild All started: Project: DnsSpoofing, Configuration: Debug x64 ------
20>------ Rebuild All started: Project: PcapPrinter, Configuration: Debug x64 ------
21>------ Rebuild All started: Project: HttpAnalyzer, Configuration: Debug x64 ------
17>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/PcapSearch/CMakeLists.txt
16>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/Arping/CMakeLists.txt
18>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/DNSResolver/CMakeLists.txt
19>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/DnsSpoofing/CMakeLists.txt
21>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/HttpAnalyzer/CMakeLists.txt
20>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/PcapPrinter/CMakeLists.txt
17>main.cpp
18>main.cpp
16>main.cpp
19>main.cpp
21>main.cpp
14>FtpTests.cpp
20>main.cpp
16>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
17>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
18>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
16>Done building project "Arping.vcxproj" -- FAILED.
22>------ Rebuild All started: Project: Pcap++Test, Configuration: Debug x64 ------
17>Done building project "PcapSearch.vcxproj" -- FAILED.
18>Done building project "DNSResolver.vcxproj" -- FAILED.
23>------ Rebuild All started: Project: IPDefragUtil, Configuration: Debug x64 ------
24>------ Rebuild All started: Project: IPFragUtil, Configuration: Debug x64 ------
25>------ Rebuild All started: Project: IcmpFileTransfer-catcher, Configuration: Debug x64 ------
19>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
19>Done building project "DnsSpoofing.vcxproj" -- FAILED.
26>------ Rebuild All started: Project: IcmpFileTransfer-pitcher, Configuration: Debug x64 ------
25>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/IcmpFileTransfer/CMakeLists.txt
24>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/IPFragUtil/CMakeLists.txt
23>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/IPDefragUtil/CMakeLists.txt
24>main.cpp
26>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/IcmpFileTransfer/CMakeLists.txt
25>Common.cpp
20>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
20>Done building project "PcapPrinter.vcxproj" -- FAILED.
27>------ Rebuild All started: Project: PcapSplitter, Configuration: Debug x64 ------
23>main.cpp
14>GreTests.cpp
21>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
27>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/PcapSplitter/CMakeLists.txt
21>Done building project "HttpAnalyzer.vcxproj" -- FAILED.
28>------ Rebuild All started: Project: SSLAnalyzer, Configuration: Debug x64 ------
26>Common.cpp
27>main.cpp
25>IcmpFileTransfer-catcher.cpp
28>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/SSLAnalyzer/CMakeLists.txt
24>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
24>Done building project "IPFragUtil.vcxproj" -- FAILED.
29>------ Rebuild All started: Project: TLSFingerprinting, Configuration: Debug x64 ------
23>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
23>Done building project "IPDefragUtil.vcxproj" -- FAILED.
30>------ Rebuild All started: Project: TcpReassembly, Configuration: Debug x64 ------
28>main.cpp
29>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/TLSFingerprinting/CMakeLists.txt
26>IcmpFileTransfer-pitcher.cpp
30>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/TcpReassembly/CMakeLists.txt
30>main.cpp
14>GtpTests.cpp
25>Generating Code...
29>main.cpp
27>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
25>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
27>Done building project "PcapSplitter.vcxproj" -- FAILED.
31>------ Rebuild All started: Project: benchmark, Configuration: Debug x64 ------
25>Done building project "IcmpFileTransfer-catcher.vcxproj" -- FAILED.
26>Generating Code...
31>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/Examples/PcapPlusPlus-benchmark/CMakeLists.txt
26>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
31>benchmark.cpp
26>Done building project "IcmpFileTransfer-pitcher.vcxproj" -- FAILED.
28>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
28>Done building project "SSLAnalyzer.vcxproj" -- FAILED.
30>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
30>Done building project "TcpReassembly.vcxproj" -- FAILED.
14>HttpTests.cpp
29>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
29>Done building project "TLSFingerprinting.vcxproj" -- FAILED.
31>LINK : fatal error LNK1104: cannot open file '..\..\Pcap++\Debug\Pcap++.lib'
31>Done building project "benchmark.vcxproj" -- FAILED.
14>IcmpTests.cpp
14>IcmpV6Tests.cpp
14>IgmpTests.cpp
14>IPSecTests.cpp
14>IPv4Tests.cpp
14>IPv6Tests.cpp
14>LLCTests.cpp
14>NflogTests.cpp
14>Generating Code...
14>Compiling...
14>NtpTests.cpp
14>PacketTests.cpp
14>PacketUtilsTests.cpp
14>PPPoETests.cpp
14>RadiusTests.cpp
14>S7CommTests.cpp
14>SipSdpTests.cpp
14>Sll2Tests.cpp
14>SllNullLoopbackTests.cpp
14>SmtpTests.cpp
14>SomeIpSdTests.cpp
14>SomeIpTests.cpp
14>SSHTests.cpp
14>SSLTests.cpp
14>StpTests.cpp
14>TcpTests.cpp
14>TelnetTests.cpp
14>TpktTests.cpp
14>VlanMplsTests.cpp
14>VrrpTest.cpp
14>Generating Code...
14>Compiling...
14>WakeOnLanTests.cpp
14>TestUtils.cpp
14>Generating Code...
14>LINK : fatal error LNK1104: cannot open file '..\..\3rdParty\MemPlumber\MemPlumber\Debug\memplumber.lib'
14>Done building project "Packet++Test.vcxproj" -- FAILED.
32>------ Rebuild All started: Project: ALL_BUILD, Configuration: Debug x64 ------
32>Building Custom Rule D:/git/gitlab/code/library/lib/src/PcapPlusPlus/PcapPlusPlus/CMakeLists.txt
33>------ Skipped Rebuild All: Project: INSTALL, Configuration: Debug x64 ------
33>Project not selected to build for this solution configuration
========== Rebuild All: 6 succeeded, 20 failed, 7 skipped ==========
@clementperon maybe you have an idea why it's not working?
@seladb I think shared library never worked on windows no? Due to memory DLL issue if I remember correctly.
I will try to see if I can reproduce on my machine
@seladb I think shared library never worked on windows no? Due to memory DLL issue if I remember correctly.
I will try to see if I can reproduce on my machine
@clementperon I think you're right! If you can confirm it that'd be great
I'm getting this same issue and I'd like to compile it with shared libs. What sort of memory DLL issue is it?
I tested it a long time ago, but if I remember correctly a shared library on Windows doesn't work well because many of PcapPlusPlus APIs expose a direct access to the internal library memory (i/.e uint8_t*
) and this doesn't work well on Windows. The application that uses a shared library can't access its internal memory. However, as I mentioned, it was a long time ago, so I don't remember all the details...
I think it is worth trying to investigate the possibility of this topic again.
I think it is worth trying to investigate the possibility of this topic again.
@clementperon do you remember if you tested it when we migrated to CMake? 🤔 Anyway, I invite anyone who wants to work on it to build a shared library on Windows and run our tests: https://pcapplusplus.github.io/docs/next/tests . If they all pass, I think it's safe to enable shared lib on Windows
We already open once the topic https://github.com/seladb/PcapPlusPlus/pull/1101
I could try to fix the build but I would not be able to push further
We already open once the topic #1101
I could try to fix the build but I would not be able to push further
Thank you @clementperon ! I had a vague memory that we already discussed this 😄 It seems like an issue that won't be easy to solve...
I got this working yesterday. You just have to compile hash_library, Common++, Packet++, and Pcap++ (I forget if there was one more but essentially just the main 3 with their deps) with /MT instead of /MD.
Of course your binary still requires npcap to run on a different system but that's to be expected.
Because there is no lib generated