title: flex: undefined reference to `yywrap' only when compiling/linking separately
body: <p>I've been learning to use Flex (the lexical analyser) and I've been compiling with the following command: </p>
  
  <p><code>gcc -lfl -o test lex.yy.c</code> </p>
  
  <p>and all is well. However, I want to link it with other files, so I compile and link it separately with</p>
  
  <p><code>gcc -c lex.yy.c</code> </p>
  
  <p>followed by </p>
  
  <p><code>gcc -lfl -o test lex.yy.o</code></p>
  
  <p>but gcc tells me that there is an undefined reference to <code>yywrap()</code>. So, what's going on here?</p>
  
  <p>I'm using Flex 2.5.35, gcc 4.7.2 and ld 2.22</p>