0

I'm a bit of a novice at C++ development. The goal is to download an correctly ready a new package so that Cygwin will understand the statement #include "pcap.h". The directions for the developer package for WinpCap were pretty straight forward:

  1. Download the ZIP archive containing the developer's pack
  2. Uncompress it to the desired folder

Developer Package Instructions Link

The part that I am having trouble with is the "desired folder" part. I found the path for where Cygwin is storing default libraries which for me is C:Cygwin64/usr/include . I placed the package in this directory but that didn't work. pcap.h is nested in the unzipped folders two or three directories in. I noticed that this is a little different when compared to the directories that were there by default.

To test whether or not this was correct or not I simply did an #include "pcap.h" statement in a .cpp file that previously compiled with no issues. With the new included statement I got a

fatal error: pcap.h: No such file or directory from Cygwin.



How should I go about solving this? The goal is to have this behave like any other directory one would want.

Iharob Al Asimi
  • 52,653
  • 6
  • 59
  • 97
hiEntropy
  • 15
  • 1
  • 3

1 Answers1

0

You could use this to find where gcc searches for the header files.

`gcc -print-prog-name=cc1plus` -v

The result of the command in a Cygwin console :

$ `gcc -print-prog-name=cc1plus` -v
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-cygwin/4.9.2/../../../../i686-pc-cygwin/include"
#include "..." search starts here:
#include <...> search starts here:    
 /usr/lib/gcc/i686-pc-cygwin/4.9.2/include/c++
 /usr/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/i686-pc-cygwin
 /usr/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/backward
 /usr/lib/gcc/i686-pc-cygwin/4.9.2/include
 /usr/lib/gcc/i686-pc-cygwin/4.9.2/include-fixed
 /usr/include
End of search list.

You could still maybe place your package's headers in one of them.

Community
  • 1
  • 1
Thronghar
  • 457
  • 2
  • 10