title: undefined reference to `gzopen` error
body: <p>My C program uses some zlib functions (like <code>gzopen</code>, <code>gzread</code>). I have included the <code>zlib.h</code> header file in my program and added the <code>-lz</code> option when compiling, but I still get an error that the gz functions have undefined references. I'm using kubuntu 11.10 and got the following packages installed: libgh-zlib-dev, zlib1g-dbg, zlib1g and zlib1g-dev.</p>
  
  <p>i have tried changing the position of the linking command, but no luck. Here is the one i have at the moment:</p>
  
  <blockquote>
    <p>CFLAGS=-Wall -pthread -lm -lz -std=c99 -Wextra</p>
  </blockquote>