title: How can I eliminate the 'main' routine of the flex & bison so I can put the lexing and parsing process into a library?
body: <p>I'm working on a parser that parses json string and I want to make it a library.
  The problem is that when I use ld to link the library I wrote, 
  there's a error message:</p>
  
  <pre><code>main.o: In function `main':
  main.c:(.text+0x0): multiple definition of `main'
  json-parser.o:/build/buildd/flex-2.5.35/libmain.c:29: first defined here
  </code></pre>
  
  <p>how can I fix this..? thanks.</p>