LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 03-11-2013, 08:05 AM   #1
mahabub hasan
LQ Newbie
 
Registered: Mar 2013
Posts: 1

Rep: Reputation: Disabled
Lex Programming in Fedora 17


I use fedora 17 version. I am trying to write and execute lex
program. But I did not do this .
I have followed these steps :

1. I have written a lex file in vi editor, say 'prog1.l'
2. lex prog1.l
3. cc lex.yy.c -ll


Here, lex.yy.c file has been generated successfully. But errors are
arising at the execution of 3rd instruction. The error is

/usr/bin/ld: can not find -ll
collect2: error : ld returned 1 exit status

I am requesting to you for helping me so that I can do any lex
program. Please give me an example also with proper instructions.
 
Old 03-11-2013, 10:54 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
The '-ll' (two lower-case 'ells') is a linker option that says 'link with "libl.so"', where libl.so is the support library required for programs built with (f)lex. The error message is telling you that the linker cannot find that file. You can find it, and add the accordant '-L /path/to/flex/lib' option to the compiler or linker commandline.
For details, man ld.
It is possible that the library is not installed (although that would seem strange, if flex is installed), and you will have to use a package manager to install it. In that case, I would anticipate that it will be installed in a place normally found by ld.

--- rod.

Last edited by theNbomr; 03-11-2013 at 10:58 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Lex and YACC on fedora 17 shambhavi Programming 4 10-09-2012 12:07 PM
lex yacc programming hrishi_j Ubuntu 4 03-02-2012 12:09 PM
Lex & yacc programming in windows. hemanexp Linux - Software 1 01-09-2004 05:41 AM
Lex & yacc Programming in linux. hemanexp Linux - Software 2 01-07-2004 11:09 AM


All times are GMT -5. The time now is 03:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration