PcapPlusPlus / new-packaging

Temp release page: https://github.com/clementperon/PcapPlusPlus/releases
0 stars 0 forks source link

Visual Studio - example app build fails with Win32 #20

Closed seladb closed 11 months ago

seladb commented 1 year ago

I downloaded the VS Win32 package: https://github.com/clementperon/PcapPlusPlus/releases/download/99.29.5/pcapplusplus-22.11+-windows-msvc-Win32-vs2019.zip

And tried to build the example app but it failed:

C:\Users\IEUser\Downloads\pcapplusplus-22.11+-windows-msvc-Win32-vs2019\example-app>cmake -S . -B build -DPcapPlusPlus_DIR=..\lib\cmake\pcapplusplus -DPCAP_ROOT=C:\Users\IEUser\npcap
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17763.
-- The C compiler identification is MSVC 19.29.30136.0
-- The CXX compiler identification is MSVC 19.29.30136.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PCAP: C:/Users/IEUser/npcap/Lib/x64/wpcap.lib
-- Performing Test PCAP_LINKS_SOLO
-- Performing Test PCAP_LINKS_SOLO - Success
-- Looking for pcap_set_immediate_mode
-- Looking for pcap_set_immediate_mode - found
-- Looking for pcap_setdirection
-- Looking for pcap_setdirection - found
-- Configuring done
CMake Error at CMakeLists.txt:11 (add_executable):
  Target "example-app" links to target "Threads::Threads" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:11 (add_executable):
  Target "example-app" links to target "Threads::Threads" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:11 (add_executable):
  Target "example-app" links to target "Threads::Threads" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:11 (add_executable):
  Target "example-app" links to target "Threads::Threads" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

C:\Users\IEUser\Downloads\pcapplusplus-22.11+-windows-msvc-Win32-vs2019\example-app>
clementperon commented 1 year ago

I have retest with latest version it should be good:

PS C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app> cmake -S . -B build -DPcapPlusPlus_ROOT="../" -DPCAP_ROOT="C:/Program Files/Npcap" -DPacket_ROOT="C:/Program Files/Npcap"
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22621.
-- The C compiler identification is MSVC 19.36.32535.0
-- The CXX compiler identification is MSVC 19.36.32535.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found PCAP: C:/Program Files/Npcap/Lib/x64/wpcap.lib
-- Performing Test PCAP_LINKS_SOLO
-- Performing Test PCAP_LINKS_SOLO - Success
-- Looking for pcap_set_immediate_mode
-- Looking for pcap_set_immediate_mode - found
-- Looking for pcap_setdirection
-- Looking for pcap_setdirection - found
-- Found Packet: C:/Program Files/Npcap/Lib/x64/Packet.lib
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/clement/Downloads/pcapplusplus-22.11+-windows-msvc-x64-vs2022/pcapplusplus-22.11+-windows-msvc-x64-vs2022/example-app/build
PS C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app> cmake --build build
MSBuild version 17.6.3+07e294721 for .NET Framework

  Checking Build System
  Building Custom Rule C:/Users/clement/Downloads/pcapplusplus-22.11+-windows-msvc-x64-vs2022/pcapplusplus-22.11+-windows-msvc-x64-vs2022/example-app/CMakeLists.txt
  main.cpp
Pcap++.lib(PcapDevice.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(PcapDevice.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Pcap++.lib(PcapFileDevice.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(PcapFileDevice.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-a
pp\build\example-app.vcxproj]
Pcap++.lib(PcapFilter.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(PcapFilter.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Pcap++.lib(light_pcapng_ext.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(light_pcapng_ext.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\examp
le-app\build\example-app.vcxproj]
Pcap++.lib(light_platform.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(light_platform.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-a
pp\build\example-app.vcxproj]
Pcap++.lib(light_pcapng.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(light_pcapng.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\b
uild\example-app.vcxproj]
Pcap++.lib(light_option.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(light_option.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\b
uild\example-app.vcxproj]
Pcap++.lib(light_manipulate.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(light_manipulate.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\examp
le-app\build\example-app.vcxproj]
Pcap++.lib(light_alloc.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(light_alloc.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Pcap++.lib(light_compression.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(light_compression.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\exa
mple-app\build\example-app.vcxproj]
Pcap++.lib(light_internal.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(light_internal.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-a
pp\build\example-app.vcxproj]
Pcap++.lib(light_null_compression.obj) : warning LNK4099: PDB '' was not found with 'Pcap++.lib(light_null_compression.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-
vs2022\example-app\build\example-app.vcxproj]
Packet++.lib(RawPacket.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(RawPacket.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(Packet.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(Packet.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build\exa
mple-app.vcxproj]
Packet++.lib(Layer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(Layer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build\examp
le-app.vcxproj]
Packet++.lib(EthLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(EthLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(EthDot3Layer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(EthDot3Layer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-a
pp\build\example-app.vcxproj]
Packet++.lib(SllLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(SllLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(NflogLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(NflogLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\b
uild\example-app.vcxproj]
Packet++.lib(NullLoopbackLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(NullLoopbackLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022
\example-app\build\example-app.vcxproj]
Packet++.lib(IPv4Layer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(IPv4Layer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(IPv6Layer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(IPv6Layer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(PayloadLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(PayloadLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-a
pp\build\example-app.vcxproj]
Packet++.lib(PacketTrailerLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(PacketTrailerLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs20
22\example-app\build\example-app.vcxproj]
Packet++.lib(ArpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(ArpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(VlanLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(VlanLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(PPPoELayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(PPPoELayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\b
uild\example-app.vcxproj]
Packet++.lib(MplsLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(MplsLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(WakeOnLanLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(WakeOnLanLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\examp
le-app\build\example-app.vcxproj]
Packet++.lib(LLCLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(LLCLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(TLVData.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(TLVData.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build\e
xample-app.vcxproj]
Packet++.lib(UdpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(UdpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(TcpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(TcpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(IcmpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(IcmpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(GreLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(GreLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(IgmpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(IgmpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(IPSecLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(IPSecLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\b
uild\example-app.vcxproj]
Packet++.lib(VrrpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(VrrpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(PacketUtils.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(PacketUtils.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app
\build\example-app.vcxproj]
Packet++.lib(IPv6Extensions.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(IPv6Extensions.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\examp
le-app\build\example-app.vcxproj]
Packet++.lib(IcmpV6Layer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(IcmpV6Layer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app
\build\example-app.vcxproj]
Packet++.lib(StpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(StpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(DnsLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(DnsLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(DhcpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(DhcpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(DhcpV6Layer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(DhcpV6Layer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app
\build\example-app.vcxproj]
Packet++.lib(VxlanLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(VxlanLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\b
uild\example-app.vcxproj]
Packet++.lib(SipLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(SipLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(RadiusLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(RadiusLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app
\build\example-app.vcxproj]
Packet++.lib(GtpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(GtpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(NtpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(NtpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(SomeIpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(SomeIpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app
\build\example-app.vcxproj]
Packet++.lib(HttpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(HttpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(SSLLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(SSLLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(BgpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(BgpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(SSHLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(SSHLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(TelnetLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(TelnetLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app
\build\example-app.vcxproj]
Packet++.lib(TpktLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(TpktLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(SingleCommandTextProtocol.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(SingleCommandTextProtocol.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows
-msvc-x64-vs2022\example-app\build\example-app.vcxproj]
Packet++.lib(FtpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(FtpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(NdpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(NdpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(DnsResource.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(DnsResource.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app
\build\example-app.vcxproj]
Packet++.lib(TextBasedProtocol.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(TextBasedProtocol.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022
\example-app\build\example-app.vcxproj]
Packet++.lib(SdpLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(SdpLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build
\example-app.vcxproj]
Packet++.lib(SomeIpSdLayer.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(SomeIpSdLayer.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example
-app\build\example-app.vcxproj]
Packet++.lib(SSLCommon.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(SSLCommon.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Packet++.lib(SSLHandshake.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(SSLHandshake.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-a
pp\build\example-app.vcxproj]
Packet++.lib(DnsResourceData.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(DnsResourceData.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\exa
mple-app\build\example-app.vcxproj]
Packet++.lib(md5.obj) : warning LNK4099: PDB '' was not found with 'Packet++.lib(md5.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build\example-a
pp.vcxproj]
Common++.lib(IpAddress.obj) : warning LNK4099: PDB '' was not found with 'Common++.lib(IpAddress.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\bui
ld\example-app.vcxproj]
Common++.lib(Logger.obj) : warning LNK4099: PDB '' was not found with 'Common++.lib(Logger.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\build\exa
mple-app.vcxproj]
Common++.lib(MacAddress.obj) : warning LNK4099: PDB '' was not found with 'Common++.lib(MacAddress.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\b
uild\example-app.vcxproj]
Common++.lib(SystemUtils.obj) : warning LNK4099: PDB '' was not found with 'Common++.lib(SystemUtils.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app
\build\example-app.vcxproj]
Common++.lib(GeneralUtils.obj) : warning LNK4099: PDB '' was not found with 'Common++.lib(GeneralUtils.obj)' or at ''; linking object as if no debug info [C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-a
pp\build\example-app.vcxproj]
  example-app.vcxproj -> C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app\Debug\example-app.exe
  Building Custom Rule C:/Users/clement/Downloads/pcapplusplus-22.11+-windows-msvc-x64-vs2022/pcapplusplus-22.11+-windows-msvc-x64-vs2022/example-app/CMakeLists.txt
PS C:\Users\clement\Downloads\pcapplusplus-22.11+-windows-msvc-x64-vs2022\pcapplusplus-22.11+-windows-msvc-x64-vs2022\example-app>
seladb commented 1 year ago

Something is still not working (this is with the latest version 99.31.5):

C:\Users\IEUser\Downloads\pcapplusplus-22.11+-windows-msvc-Win32-vs2019\example-app>cmake -S . -B build -DPcapPlusPlus_ROOT=../ -DPCAP_ROOT=C:\Users\IEUser\npcap -DPacket_ROOT=C:\Users\IEUser\npcap
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17763.
-- The C compiler identification is MSVC 19.29.30136.0
-- The CXX compiler identification is MSVC 19.29.30136.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PCAP: C:/Users/IEUser/npcap/Lib/x64/wpcap.lib
-- Performing Test PCAP_LINKS_SOLO
-- Performing Test PCAP_LINKS_SOLO - Success
-- Looking for pcap_set_immediate_mode
-- Looking for pcap_set_immediate_mode - found
-- Looking for pcap_setdirection
-- Looking for pcap_setdirection - found
-- Configuring done
CMake Error at CMakeLists.txt:11 (add_executable):
  Target "example-app" links to target "Threads::Threads" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:11 (add_executable):
  Target "example-app" links to target "Threads::Threads" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:11 (add_executable):
  Target "example-app" links to target "Threads::Threads" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:11 (add_executable):
  Target "example-app" links to target "Threads::Threads" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    Packet_ROOT

CMake Generate step failed.  Build files cannot be regenerated correctly.
seladb commented 1 year ago

It also doesn't work if I change C:\Users\IEUser\npcap to C:\Program Files\Npcap...

By the way, it does work on x64, it doesn't work only on Win32