LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-19-2007, 07:15 AM   #1
amolbhor
LQ Newbie
 
Registered: Jan 2007
Posts: 4

Rep: Reputation: 0
Unhappy problem faced regarding gcc


Hello everyone,

I have ubuntu 6.06 dapper drake installed on my system. I upgraded all the available packages from net.I compiled the C program on it successfully.But couple of days later when I was installing an application from tarball(source code) but it wasn't worked.
Then I tried to compile a simple hello world program. Here is the error I got

#]gcc hello.c
/usr/local/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
#]

Please somebody help me.

Thanks & regards
Amol
 
Old 01-19-2007, 07:59 AM   #2
tbutttbutt
Member
 
Registered: Jan 2006
Location: India
Distribution: Fedora 7, Linuxfromscratch 6.2
Posts: 66

Rep: Reputation: 15
The normal command line for gcc should be something like:

gcc -o <outputfilename> hello.c

Maybe that is the problem?
Otherwise, the linker seems to be having a problem to link in something. Have you #included whatever is required?
 
Old 01-20-2007, 03:43 AM   #3
amolbhor
LQ Newbie
 
Registered: Jan 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Hi buddy,

Thanks for the reply.I tried with the command you suggested but the problem was with linker it was not getting the file needed.
however I reinstalled and solved the problem. But thanks once again for the great support!
 
  


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
Problem faced during 'make install'.. Help me! Awg Semile Apong Linux - Software 2 03-05-2009 03:28 AM
Solved Problem Second GCC-Pass(or gettext sanity check problem) hoes Linux From Scratch 0 09-04-2005 10:20 AM
linux starter , problems faced suresh_reddy Mandriva 0 02-27-2004 02:24 PM
Newbie with Red Hat 8.0 and faced sound problems gilbort Linux - Hardware 1 02-18-2003 12:47 PM
I have faced problem while configuring Kernal in RedHad 8.0 praful Linux - Newbie 1 02-08-2003 11:55 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:43 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