0

I need to use a flex++ generated parser code in my Qt application. I got this error:

  undefined reference to `yyFlexLexer::yywrap()

I also added this line to .pro file:

LIBS += -lfl
sorush-r
  • 10,490
  • 17
  • 89
  • 173
  • Is that a typo in your post or do you really have `LIBIS` somewhere? – Mat Jul 17 '11 at 14:29
  • Did you use the [LEXSOURCES](http://doc.qt.nokia.com/4.7/qmake-variable-reference.html#lexsources) qmake property? – Mat Jul 17 '11 at 14:33
  • Well, you should at least try. If it fixes your issue, then you should definitely use it :-) – Mat Jul 17 '11 at 14:41
  • I tried to add `LEXSOURCES=lex.yy.cc` and got 995 errors, so I guess should add rules file, true? but `LEXSOURCES=rules.l` not helped... There is nothing about LEXSOURCES variable in documentation ! – sorush-r Jul 17 '11 at 14:52

1 Answers1

0

What you are searching for is a simple

%option noyywrap

in the Options section

%{
    DECLARATION
%}
OPTIONS
%%
RULES
%%
MISC. C IMPLEMENTATION

and maby you want to add these as well:

%option nounistd
%option never-interactive
Ich
  • 1,350
  • 16
  • 27