Hi. I am a beginner with Flex. I am using flex-2.5.4a37.4 on fedora core 5. i prepared a file lex.l (the contents of which are copied at the end of the mail). then i issued the following commands : flex lex.l gcc -lfl
lex.yy.c however the linker produced the error :
/tmp/ccodQ1yE.o: In function `main':lex.yy.c:(.text+0xfb3): multiple definition of `main' /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../libfl.a(libmain.o): first defined here
/usr/bin/ld: Warning: size of symbol `main' changed from 48 in /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../libfl.a(libmain.o) to 55 in /tmp/ccodQ1yE.o collect2: ld returned 1 exit status
can someone please point out my error?
sincerely, rahul garg
the input file lex.l is :
%option nomain noyywrap delim [ \t\n] ws {delim}+ letter [a-zA-Z] digit [0-9] id {letter}({letter}|{digit})* number {digit}+(\.{digit}+)?(E[+-]?{digit}+)?