S
sam_cit
Hi,
I just have the simple lex program
%%
. ECHO;
%%
int main()
{
yylex();
}
i did this, lex sample.l, which resulted in lex.yy.c then i tried to
complie the produced c file, on which i get the following error,
/tmp/ccYMo5KN.o: In function `yylex':
/tmp/ccYMo5KN.o(.text+0x353): undefined reference to `yywrap'
/tmp/ccYMo5KN.o: In function `input':
/tmp/ccYMo5KN.o(.text+0xb1a): undefined reference to `yywrap'
collect2: ld returned 1 exit status
Only way i have worked out is to have my own yywrap() function which
returns 1 always, but having said iam not able to understand the cause
of the problem, a simple lex program should work, like the following
%%
.. ECHO;
%%
but why isn't?
I just have the simple lex program
%%
. ECHO;
%%
int main()
{
yylex();
}
i did this, lex sample.l, which resulted in lex.yy.c then i tried to
complie the produced c file, on which i get the following error,
/tmp/ccYMo5KN.o: In function `yylex':
/tmp/ccYMo5KN.o(.text+0x353): undefined reference to `yywrap'
/tmp/ccYMo5KN.o: In function `input':
/tmp/ccYMo5KN.o(.text+0xb1a): undefined reference to `yywrap'
collect2: ld returned 1 exit status
Only way i have worked out is to have my own yywrap() function which
returns 1 always, but having said iam not able to understand the cause
of the problem, a simple lex program should work, like the following
%%
.. ECHO;
%%
but why isn't?