cygwin,
$flex ch1-02.l
$gcc lex.yy.c -o ch1-02.exe
/cygdrive/d/Profiles/E6097C/LOCALS~1/Temp/ccFsaC7D.o:lex.yy.c:(.text+0x36c): und
efined reference to `_yywrap'
/cygdrive/d/Profiles/E6097C/LOCALS~1/Temp/ccFsaC7D.o:lex.yy.c:(.text+0xac1): und
efined reference to `_yywrap'
collect2: ld returned 1 exit status
solution: compile it with -lfl option.
gcc lex.yy.c -o ch1-02.exe -lfl
- Mihir Patel
5 comments:
This does work.
Thank you.
Thanks! That worked like a charm!
I wish you also explained what these options mean..
OK.. i got it!
So -lfl tells the linker to link with the library: libfl.a or libfl.so which are Flex libraries under /usr/lib
:)
superb...thankyou
You could add this function instead and compile normally
yywrap()
{
}
Post a Comment