Open
Description
I suppose this error only happens on MacOS. When I use libpcap in my project and link it and try to compile it using CMake, it fails with error:
lib/third_party/libpcap/version:1:1: error: expected unqualified-id
As I understood, MacOS compiler is trying to use this file as simple code file because the problem is caused by this:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/iostream:38:
.
Also, I can say that this could be fixed by renaming VERSION file to VERSION.txt and changing line 552 in CMakeLists.txt from this:
file(STRINGS ${pcap_SOURCE_DIR}/VERSION
to this
file(STRINGS ${pcap_SOURCE_DIR}/VERSION.txt