Niezdefiniowane odniesienie do yywrap

Mam prosty „język”, w którym używam Flexa (Lexical Analyzer), wygląda to tak:

/* Just like UNIX wc */
%{
int chars = 0;
int words = 0;
int lines = 0;
%}

%%
[a-zA-Z]+ { words++; chars += strlen(yytext); }
\n        { chars++; lines++; }
.         { chars++; }
%%

int main()
{
    yylex();
    printf("%8d%8d%8d\n", lines, words, chars);
}

Ja biegnęflex count.l, wszystko idzie dobrze bez błędów i ostrzeżeń, a następnie, gdy próbuję zrobićcc lex.yy.c Mam te błędy:

ubuntu @ eeepc: ~ / Desktop $ cc lex.yy.c
/tmp/ccwwkhvq.o: W funkcjiyylex': lex.yy.c:(.text+0x402): undefined reference toyywrap '
/tmp/ccwwkhvq.o: W funkcjiinput': lex.yy.c:(.text+0xe25): undefined reference toyywrap '
collect2: ld zwrócił 1 status wyjścia

Co jest nie tak?

questionAnswers(5)

yourAnswerToTheQuestion