Issue Building PcapPlusPlus Library From Source on Windows - MinGW-w64

14 views
Skip to first unread message

EMAN YEHIA

unread,
Apr 19, 2024, 1:43:27 AMApr 19
to PcapPlusPlus support
  Hello,

 I'm currently trying to build the PcapPlusPlus library in windows  to include it in another project. I'm following the instructions outlined in the documentation [https://pcapplusplus.github.io/docs/install/mingw]. However, I've encountered an error at the first step of the build installation process.

Error Message:
CMake Error at cmake/modules/FindPCAP.cmake:77 (message):
  Couldn't determine how to link against libpcap
Call Stack (most recent call first):
  CMakeLists.txt:123 (find_package)

I've reviewed the documentation and checked my setup, but I'm still unable to resolve this issue. Could you please provide assistance or guidance on how to proceed?

Any help you can offer would be greatly appreciated. Thank you in advance for your time and support.  

PcapPlusPlus Support

unread,
Apr 21, 2024, 10:53:21 PMApr 21
to EMAN YEHIA, PcapPlusPlus support
Hi,

Did you specify: -DPCAP_ROOT=<NpcapSDK_or_WinPcapDevPack_Directory>?
With the specific path where WinPcap / Npcap is installed?
Which SDK are you using? Is it WinPcap or Npcap?

Thanks,
PcapPlusPlus maintainer


--
You received this message because you are subscribed to the Google Groups "PcapPlusPlus support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pcapplusplus-sup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pcapplusplus-support/a20e633c-3096-4ad9-8c25-5a5586efa3can%40googlegroups.com.

EMAN YEHIA

unread,
Apr 22, 2024, 7:49:54 AMApr 22
to PcapPlusPlus support
- Yes, I used this command cmake -G "MinGW Makefiles" -DPCAP_ROOT="D:\CPS\Projects\Recording\Recording Sniffer\npcap-sdk-1.13" -S . -B build. in cmd and an environment variable with key PCAP_ROOT and value  D:\CPS\Projects\Recording\Recording Sniffer\npcap-sdk-1.13 is created.
- I installed  npcap-1.79
- I used npcap-sdk-1.13

PcapPlusPlus Support

unread,
Apr 30, 2024, 3:31:08 AMApr 30
to EMAN YEHIA, PcapPlusPlus support
Maybe you don't have Npcap installed on your system?
I think it can't find the .dll file which Npcap installer installs.

Thanks,
PcapPlusPlus maintainer


EMAN YEHIA

unread,
May 2, 2024, 9:32:16 AMMay 2
to PcapPlusPlus support
Yes, i install it but I can't solve the issues so, I tried to compile pcap plus plus using visual studio and is build success, but when I try to create my app to use   pcap plus plus this error appear
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
CMake Error at C:/Program Files/CMake/share/cmake-3.29/Modules/CMakeFindDependencyMacro.cmake:76 (find_package):
  By not providing "FindPCAP.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "PCAP", but
  CMake did not find one.

  Could not find a package configuration file provided by "PCAP" with any of
  the following names:

    PCAPConfig.cmake
    pcap-config.cmake

  Add the installation prefix of "PCAP" to CMAKE_PREFIX_PATH or set
  "PCAP_DIR" to a directory containing one of the above files.  If "PCAP"
  provides a separate development package or SDK, be sure it has been
  installed.

Call Stack (most recent call first):
  D:/CPS/Projects/Recording/Recording Sniffer/PcapPlusPlus/build/PcapPlusPlusConfig.cmake:48 (find_dependency)
  CMakeLists.txt:25 (find_package)


-- Configuring incomplete, errors occurred!
Reply all
Reply to author
Forward
0 new messages