title: Mac Zlib ndefined symbols for architecture x86_64:
body: <p>I am trying to build a simple program using zlib.h in Xcode to read in and inflate .gz file. Though when building the program I am getting the infamous </p>
  
  <pre><code>Undefined symbols for architecture x86_64:
  
   "_inflate", referenced from:
        decomp() in main.o
    "_inflateEnd", referenced from:
        decomp() in main.o
    "_inflateInit2_", referenced from:
        decomp() in main.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>For the zlib methods inflate, inflateEnd etc.</p>
  
  <pre><code>#include &lt;zlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  int main(){
  ...inflate method here..}
  </code></pre>
  
  <p>Thanks
  Sam</p>