help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Query About Flex Usage


From: Dan Haggarty
Subject: Re: Query About Flex Usage
Date: Sat, 07 Jan 2006 12:22:34 -0500

At 11:42 AM 1/7/06, Ramprasad B wrote:
>This is my first post to this mailing list.
>I have one simple query / doubt about generating a lex scanner generator.
>I am doing these steps -
>
># flex parser.l
># gcc lex.yy.c
>
>but after this i get some errors as
>
>/tmp/ccAKLeZj.o(.text+0x1790): In function `yylex':
>: undefined reference to `yywrap'
>/tmp/ccAKLeZj.o(.text+0x1d72): In function `input':
>: undefined reference to `yywrap'
>collect2: ld returned 1 exit status
>
>do wehave to link some library ?

If you don't want to write your own yywrap() function, link in the flex library 
to use the default implementation:

   gcc lex.yy.c -lfl

Dan 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]