title: Problems using libpng in iPhone project
body: <p>I am trying to add libpng to my iPhone project. </p>
  
  <p>I copied the .c and .h files to their own directory "thirdparty/libpng/" and I included png.h in my texture class:</p>
  
  <pre><code>#ifndef PNG_H
      #include "thirdparty/libpng/png.h"
  #endif
  </code></pre>
  
  <p>At this point my project compiles great with no warnings and errors.</p>
  
  <p>Next I tried adding a function to check if a texture is a png, and I get a compile error on png_sig_cmp, even though png.h is included:</p>
  
  <pre><code>#define PNG_BYTES_TO_CHECK 4
  int GETexture::CheckIfValidPNGTexture( const char* pTextureName, FILE **ppFp )
  {
      char buf[PNG_BYTES_TO_CHECK];
  
      /* Open the prospective PNG file. */
      if ((*ppFp = fopen(pTextureName, "rb")) == NULL)
          return 0;
  
      /* Read in some of the signature bytes */
      if (fread(buf, 1, PNG_BYTES_TO_CHECK, *ppFp) != PNG_BYTES_TO_CHECK)
          return 0;
  
      /* Compare the first PNG_BYTES_TO_CHECK bytes of the signature.
       Return nonzero (true) if they match */
  
      return(!png_sig_cmp(buf, (png_size_t)0, PNG_BYTES_TO_CHECK)); // &lt;- COMPILE ERROR
  
  }
  </code></pre>
  
  <p>The error I get is: No matching function for call to 'png_sig_cmp'</p>
  
  <p>The header is definitely getting included. If I try to type something random in it like "sdfdd" I get a compile error, showing it is parsing that header file.</p>
  
  <p>Any ideas?</p>