title: GNU readline History feature
body: <p>I'm using this code for the history features in my shell: 
  <a href="http://cc.byexamples.com/20080613/gnu-readline-how-to-keep-a-history-list-of-entered-command-lines/" rel="nofollow noreferrer">http://cc.byexamples.com/20080613/gnu-readline-how-to-keep-a-history-list-of-entered-command-lines/</a>
  but when I compile this using gcc, I got this error </p>
  
  <pre><code>$ gcc filename.c
  /tmp/ccay2CgM.o: In function `main':
  rl.c:(.text+0x9): undefined reference to `rl_abort'
  rl.c:(.text+0x13): undefined reference to `rl_bind_key'
  rl.c:(.text+0x1d): undefined reference to `readline'
  rl.c:(.text+0x61): undefined reference to `add_history'
  collect2: ld returned 1 exit status
  $
  </code></pre>