seladb / PcapPlusPlus

PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use. It provides C++ wrappers for the most popular packet processing engines such as libpcap, Npcap, WinPcap, DPDK, AF_XDP and PF_RING.
https://pcapplusplus.github.io/
The Unlicense
2.63k stars 639 forks source link

-DBUILD_SHARED_LIBS=ON cannot work in Windows #1396

Open kouzhudong opened 1 month ago

kouzhudong commented 1 month ago

Because there is no lib generated

已启动生成…
1>------ 已跳过生成: 项目: Experimental, 配置: Debug x64 ------
1>没有为此解决方案配置选中要生成的项目 
2>------ 已跳过生成: 项目: Continuous, 配置: Debug x64 ------
2>没有为此解决方案配置选中要生成的项目 
3>------ 已跳过生成: 项目: NightlyMemoryCheck, 配置: Debug x64 ------
3>没有为此解决方案配置选中要生成的项目 
4>------ 已跳过生成: 项目: RUN_TESTS, 配置: Debug x64 ------
4>没有为此解决方案配置选中要生成的项目 
5>------ 已启动生成: 项目: Packet++, 配置: Debug x64 ------
6>------ 已跳过生成: 项目: Nightly, 配置: Debug x64 ------
6>没有为此解决方案配置选中要生成的项目 
7>------ 已跳过生成: 项目: uninstall, 配置: Debug x64 ------
7>没有为此解决方案配置选中要生成的项目 
5>LINK : fatal error LNK1104: 无法打开文件“..\Common++\Debug\Common++.lib”
5>已完成生成项目“Packet++.vcxproj”的操作 - 失败。
8>------ 已启动生成: 项目: Pcap++, 配置: Debug x64 ------
9>------ 已启动生成: 项目: Packet++Test, 配置: Debug x64 ------
8>LINK : fatal error LNK1104: 无法打开文件“..\Packet++\Debug\Packet++.lib”
8>已完成生成项目“Pcap++.vcxproj”的操作 - 失败。
10>------ 已启动生成: 项目: ArpSpoofing, 配置: Debug x64 ------
11>------ 已启动生成: 项目: Arping, 配置: Debug x64 ------
12>------ 已启动生成: 项目: PcapSearch, 配置: Debug x64 ------
13>------ 已启动生成: 项目: DNSResolver, 配置: Debug x64 ------
14>------ 已启动生成: 项目: DnsSpoofing, 配置: Debug x64 ------
15>------ 已启动生成: 项目: PcapPrinter, 配置: Debug x64 ------
16>------ 已启动生成: 项目: HttpAnalyzer, 配置: Debug x64 ------
9>LINK : fatal error LNK1104: 无法打开文件“..\..\3rdParty\MemPlumber\MemPlumber\Debug\memplumber.lib”
9>已完成生成项目“Packet++Test.vcxproj”的操作 - 失败。
17>------ 已启动生成: 项目: Pcap++Test, 配置: Debug x64 ------
10>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
10>已完成生成项目“ArpSpoofing.vcxproj”的操作 - 失败。
11>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
11>已完成生成项目“Arping.vcxproj”的操作 - 失败。
12>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
12>已完成生成项目“PcapSearch.vcxproj”的操作 - 失败。
14>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
14>已完成生成项目“DnsSpoofing.vcxproj”的操作 - 失败。
18>------ 已启动生成: 项目: IPDefragUtil, 配置: Debug x64 ------
19>------ 已启动生成: 项目: IPFragUtil, 配置: Debug x64 ------
20>------ 已启动生成: 项目: IcmpFileTransfer-catcher, 配置: Debug x64 ------
21>------ 已启动生成: 项目: IcmpFileTransfer-pitcher, 配置: Debug x64 ------
20>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
16>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
13>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
21>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
22>------ 已启动生成: 项目: PcapSplitter, 配置: Debug x64 ------
13>已完成生成项目“DNSResolver.vcxproj”的操作 - 失败。
20>已完成生成项目“IcmpFileTransfer-catcher.vcxproj”的操作 - 失败。
16>已完成生成项目“HttpAnalyzer.vcxproj”的操作 - 失败。
21>已完成生成项目“IcmpFileTransfer-pitcher.vcxproj”的操作 - 失败。
23>------ 已启动生成: 项目: SSLAnalyzer, 配置: Debug x64 ------
24>------ 已启动生成: 项目: TLSFingerprinting, 配置: Debug x64 ------
25>------ 已启动生成: 项目: TcpReassembly, 配置: Debug x64 ------
26>------ 已启动生成: 项目: benchmark, 配置: Debug x64 ------
15>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
15>已完成生成项目“PcapPrinter.vcxproj”的操作 - 失败。
23>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
23>已完成生成项目“SSLAnalyzer.vcxproj”的操作 - 失败。
24>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
24>已完成生成项目“TLSFingerprinting.vcxproj”的操作 - 失败。
22>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
22>已完成生成项目“PcapSplitter.vcxproj”的操作 - 失败。
25>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
25>已完成生成项目“TcpReassembly.vcxproj”的操作 - 失败。
26>LINK : fatal error LNK1104: 无法打开文件“..\..\Pcap++\Debug\Pcap++.lib”
26>已完成生成项目“benchmark.vcxproj”的操作 - 失败。
17>LINK : fatal error LNK1104: 无法打开文件“..\..\3rdParty\MemPlumber\MemPlumber\Debug\memplumber.lib”
17>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(1074,5): error MSB6006: “link.exe”已退出,代码为 1104。
17>已完成生成项目“Pcap++Test.vcxproj”的操作 - 失败。
27>------ 已跳过生成: 项目: INSTALL, 配置: Debug x64 ------
27>没有为此解决方案配置选中要生成的项目 
========== 生成: 成功 0 个,失败 20 个,最新 6 个,跳过 7 个 ==========
seladb commented 1 month ago

@kouzhudong Unfortunately I don't understand Chinese. Is it possible to compile it in English?

kouzhudong commented 1 month ago
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 ==========
seladb commented 1 month ago

@clementperon maybe you have an idea why it's not working?

clementperon commented 1 month ago

@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 commented 1 month ago

@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

Marshall-Hallenbeck commented 1 month ago

I'm getting this same issue and I'd like to compile it with shared libs. What sort of memory DLL issue is it?

seladb commented 1 month ago

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...

tigercosmos commented 1 month ago

I think it is worth trying to investigate the possibility of this topic again.

seladb commented 1 month ago

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

clementperon commented 1 month ago

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

seladb commented 1 month ago

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...

Marshall-Hallenbeck commented 1 month ago

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.