title: pcap_lookupdev undefined
body: <p>I am developing for OSX 10.8.  I just installed <code>libpcap</code> via MacPorts and tried running a simple device hunter (below)</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;pcap.h&gt;
  
  int main(int argc,char *argv[])
  {
      char *dev, errbuf[PCAP_ERRBUF_SIZE];
  
      dev = pcap_lookupdev(errbuf);
      if(dev == NULL)
      {
          fprintf(stderr, "Couldn't find default device: %s\n", errbuf);
          return(2);
      }
  
      printf("Device %s\n", dev);
      return(0);
  }
  </code></pre>
  
  <p>and while trying to compile with g++ i am getting:</p>
  
  <pre><code>    Undefined symbols for architecture x86_64:
    "_pcap_lookupdev", referenced from:
        _main in ccIMp1m2.o
  </code></pre>
  
  <p>Any helpful advice so I can actually get started with learning this stuff would be great! I googled for a solid 10-15 minutes but just couldn't find much on my particular issue with my setup. </p>