-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile on Windows CMake issue #1225
Comments
(formatting applied to display the slashes correctly -- Denis) Okay, I found the issue. On windows you have to use forward slashes for the CMake comand prompt. For example:
do not use double backslashes like so
I'm just getting back to C++ so if this seems obvious my apologies. |
That's hyper-spectacularly broken. I'll try to figure out what needs to be done to fix that. |
It seems possible that CMake takes both slashes and backslashes as valid input and then converts as is necessary for the OS (note the |
I'm not seeing that problem on my Windows 11 VM. I followed the instructions at https://github.com/the-tcpdump-group/tcpdump/blob/master/doc/README.windows.md, in an "x64 Native Tools Command Prompt for VS 2022" window. Those instructions use single backslashes, not double backslashes. |
Why? In my tests, it worked without that; the CMake script itself sets those. ( |
Guy, I should have removed that from my original comment. I was using \ and cmake doesn't throw errors, it actually tells you it can't find PCAP_INCLUDE_DIR and PCAP_LIBRARY which I interpreted as needing to be added. I'll edit the comment and remove it. |
Guy, I just looked at the directions and the only reference I see to slashes is in the Visual Studio 2017 GUI section where it says to use double backslashes, not forward slashes. Perhaps I'm missing something, but I don't see any examples or explanation that on the commandline to use forward slashes when defining the PCAP_ROOT variable. Thanks, |
Hello,
I'm attempting to compile tcpdump on Windows 11 using version 1.13 of the NPCap SDK and Visual Studio 17 2022. I'm getting an error that libpcap is too old; 1.0 or later is required but I'm using the 1.13 version of the SDK.
I looked at the pcap.h file and it has the following:
PCAP_AVAILABLE_1_0
PCAP_API pcap_t *pcap_create(const char *, char *);
PCAP_AVAILABLE_1_0
PCAP_API const char *pcap_statustostr(int);
Thank you for any help you can offer.
I issue the following command:
cmake "-DPCAP_ROOT=\development\npcap-sdk-1-13" -G "Visual Studio 17 2022" -A Win32 ..
And I receive the following output:
-- The C compiler identification is MSVC 19.41.34120.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.41.34120/bin/Hostx64/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Building 32-bit
-- Use DYNAMIC runtime
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Looking for rpc/rpc.h
-- Looking for rpc/rpc.h - not found
-- Looking for strlcat
-- Looking for strlcat - not found
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Looking for strsep
-- Looking for strsep - not found
-- Looking for gethostbyaddr
-- Looking for gethostbyaddr - found
-- Looking for getservent
-- Looking for getservent - not found
-- Looking for getservent
-- Looking for getservent - not found
-- Skipped SUITABLE_SNPRINTF because cross-compiling.
-- Looking for getopt_long
-- Looking for getopt_long - not found
-- Looking for getrpcbynumber
-- Looking for getrpcbynumber - not found
-- Looking for getrpcbynumber
-- Looking for getrpcbynumber - not found
-- Looking for ether_ntohost
-- Looking for ether_ntohost - not found
-- Found PCAP: //development/npcap-sdk-1-13/include
-- Looking for pcap/pcap-inttypes.h
-- Looking for pcap/pcap-inttypes.h - not found
-- Looking for pcap_create
-- Looking for pcap_create - not found
CMake Error at CMakeLists.txt:778 (MESSAGE):
libpcap is too old; 1.0 or later is required
-- Configuring incomplete, errors occurred!
The text was updated successfully, but these errors were encountered: