title: Problem in including an external library while compiling a C++ program
body: <p>I'm using Dev C++ on windows 7, and WinPcap (developer's pack). Dev c++ is not able to find pcap.h apparently, even though I include the /include/ directory in project options, on compilation it displays an error saying "pcap.h: no such file or directory." (along with many other errors).
  Here is my code:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;pcap.h&gt;
  
  int main(int argc, char **argv)
  {
  pcap_t *fp;
  char errbuf[PCAP_ERRBUF_SIZE];
  u_char packet[100];
  
      return 0;
  }
  </code></pre>
  
  <p>I've kept it simple. I was originally working in Visual Studio (C++), but distributing code compiled with Visual C++ requires Microsoft C Runtime library to be installed on the target system. I just want to be able to distribute the final executable and get it to work on any machine.</p>
  
  <p>I checked the commmand line given to compiler. It <strong>did</strong> have the -I [path] option. Well is there anything I'm missing?</p>
  
  <p>As a side note: I had compiled the above code with g++ (from dev c++ installation dir), and it compiled correctly. But when I tried to link it, the executable produced, just crashed on being run.</p>