title: Using hiredis (redis client library)
body: <p>I have the redis server installed, and can use it from the command line. Now, I am wanting to write a client program using hiredis. To begin with, I tried to compile example.c which is present in the hiredis directory:</p>
  
  <pre><code>vishal@expmach:~/redis-2.6.14/deps/hiredis$ ls
  
  adapters  async.h       COPYING  dict.h        *example.c*        example-libevent.c      
  hiredis.c  Makefile  net.h      sds.c  test.c async.c   CHANGELOG.md  dict.c   example-
  ae.c  example-libev.c  fmacros.h           hiredis.h  net.c     README.md  sds.h
  </code></pre>
  
  <p>Here are the commands:</p>
  
  <pre><code>vishal@expmach:~/redis-2.6.14/deps/hiredis$ gcc -c -I hiredis example.c
  vishal@expmach:~/redis-2.6.14/deps/hiredis$ gcc -o example -I hiredis -L hiredis -lhiredis -lm
  </code></pre>
  
  <p>/usr/bin/ld: cannot find -lhiredis
  collect2: ld returned 1 exit status</p>
  
  <p>I am not sure how to go about fixing this. Please help.</p>