LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 10-08-2008, 07:59 AM   #1
sagar_parmar
LQ Newbie
 
Registered: Oct 2008
Posts: 3

Rep: Reputation: 0
Exclamation gcc -ly not working..


hello!!
I have installed Fedora 9 in Vmware and I tried to run .y file using command yacc -d 123.y which generates y.tab.c file..yacc commnad generates y.tab.c which is correct one..Then I tried gcc y.tab.c -ly but it shows following error...
/usr/bin/ld: cannot find -ly
collect2:ld returned 1 exit status

please help!!

Last edited by sagar_parmar; 10-10-2008 at 01:19 PM.
 
Old 10-09-2008, 09:22 AM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
I think .y files are yacc input files and you need to run yacc or bison on it first to generate a .c file that you can then compile with gcc
 
Old 10-10-2008, 01:21 PM   #3
sagar_parmar
LQ Newbie
 
Registered: Oct 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by estabroo View Post
I think .y files are yacc input files and you need to run yacc or bison on it first to generate a .c file that you can then compile with gcc
Hi..there was a mistake in my thread which I have corrected..please check it out!
 
Old 10-10-2008, 02:46 PM   #4
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
That error means you either don't have liby(.a|.so) installed or its not in the linker's search path. Try adding -L with the path to where liby.a is
For example:

gcc -c y.tab.c -L/usr/lib -ly


You could always try it without the -ly if that library isn't needed to compile the generated .c file
 
Old 10-17-2008, 05:25 AM   #5
sagar_parmar
LQ Newbie
 
Registered: Oct 2008
Posts: 3

Original Poster
Rep: Reputation: 0
lby.a not installled

Quote:
Originally Posted by estabroo View Post
That error means you either don't have liby(.a|.so) installed or its not in the linker's search path. Try adding -L with the path to where liby.a is
For example:

gcc -c y.tab.c -L/usr/lib -ly


You could always try it without the -ly if that library isn't needed to compile the generated .c file
Hi...I dont have liby.a file installed..so how can I get it? plz help!
 
Old 10-17-2008, 11:13 PM   #6
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
It should be part of the yacc or bison package (at least it is on debian). Just make sure you have one of those installed correctly.
 
  


Reply



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
gcc not working after chroot pillairajeevr Linux From Scratch 2 07-20-2008 10:00 AM
working with two gcc ?! muby Linux - Newbie 1 11-10-2007 11:17 PM
gcc doesn't seem to be working... lukeiamyourfather Linux From Scratch 7 08-01-2007 03:25 AM
the linker is not working (gcc ) abd_bela Ubuntu 1 09-13-2005 03:51 PM
gcc not working bluknight43 Programming 4 02-14-2005 01:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 05:20 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration