title: Cannot Use Flex and Bison Together on Qt
body: <p>I am developing a project which I have to develop a compiler(actually a parser) besides the main project. I am using Qt 5.3 and Windows (But the result is almost the same on Ubuntu 14.04).<br>
  I am experienced in using flex and bison, however this time, firs I develop a Scanner and then Parser. I test the scanner carefully and made sure it is error less. but as I add the parser to the project many errors occurred.(for example undefined reference to <code>yylex()</code>, however I declared <code>extern int yylex()</code> and I cannot use library as I will mention) and after that when I eliminate the parser, some features which worked before are not working now! for example, now I cannot use <code>#include &lt;QDebug&gt;</code>!<br>
  When I use this header file, Compiler say there are many errors(77 error) in this library! I got confused, it has been two days I am working on this and there is no progress.<br>
  I used "Custom Build Steps" and I set the path to <code>${sourceDir}</code>. In addition I added <code>lex.yy.c</code>,<code>y.tab.c</code> in <code>SOURCES</code> and <code>y.tab.h</code> in <code>HEADERS</code> in <code>.pro</code> file.<br>
  I learned how to use flex and bison via <a href="http://aquamentus.com/tut_lexyacc.html" rel="nofollow noreferrer">here</a> for the first time. and for those errors I read the followings:<br>
  <a href="https://stackoverflow.com/questions/28211952/y-tab-c-undefined-reference-to-yylex">Undefined Reference to <code>yylex()</code></a><br>
  <a href="https://stackoverflow.com/questions/14412446/how-to-integrate-flex-and-bison-with-qt-project">How to Integrate Flex and Bison</a><br>
  and some other links...</p>