title: getopt implicit declaration in Solaris?
body: <p>In Solaris, gcc gives me </p>
  
  <blockquote>
    <p>implicit declaration of function `getopt'</p>
  </blockquote>
  
  <p>when compiling</p>
  
  <pre><code>#include &lt;unistd.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main(int argc, char *argv[]) {
      getopt(1,argv,"");
      return 0;
  } 
  </code></pre>
  
  <p>The <a href="http://docs.oracle.com/cd/E23824_01/html/821-1465/getopt-3c.html#scrolltoc" rel="nofollow noreferrer">man page</a> for getopt says something about including unistd.h or stdio.h, however even though I'm inluding both I still get this warning. Is this normal? Is using functions that aren't explicitly declared common in Unix development?</p>