Guideline to debug the error in lex and yacc prgm

asked 2013-08-20 14:38:39 -0500

mahantesh gravatar image

updated 2013-08-20 22:43:19 -0500

FranciscoD_ gravatar image

I using the fedora 16 and i installed the lex and yacc packages along with gcc compiler but i copiled an prgm i getting the error as mentioned below

[mantu@localhost lex_yacc]$ lex one.l
[mantu@localhost lex_yacc]$ cc lex.yy.c -ll
/usr/bin/ld: cannot find -ll
collect2: ld returned 1 exit status
edit retag flag offensive close merge delete


What library are you trying to link against using -ll? If you're referring a book, please re-read the commands and replicate them exactly. I'd recommend using Fedora 18 or 19. The lex and yacc etc. commands should be the same.

FranciscoD_ gravatar imageFranciscoD_ ( 2013-08-20 22:45:44 -0500 )edit

You can install the missing library on Fedora 16 with::

    yum install flex-static

Starting from Fedora 18 the package is called flex-devel. Fedora ships only a static version::

    rpm -qf /usr/lib*/libl.a
marcindulak gravatar imagemarcindulak ( 2013-08-21 06:37:23 -0500 )edit