LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-06-2010, 12:10 PM   #1
vuhuynh
LQ Newbie
 
Registered: Feb 2008
Posts: 14

Rep: Reputation: 0
Compile C program error


Hello,

When I compile a C program in Fedora Core 12 using the following format:
gcc -o program -static program.c

I get an error:
/usr/bin/ld: cannot find -lc
collect2: ld returned l exit status

What do I need to do to make the program compile correctly with the -static flag ??

Thanks in advance.
 
Old 07-06-2010, 12:11 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,823

Rep: Reputation: 611Reputation: 611Reputation: 611Reputation: 611Reputation: 611Reputation: 611
Try installing glibc-devel.
 
  


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
C++ compiler(G++) comes up with error when I try to compile a program using Qt. rohedin Programming 7 05-27-2010 10:28 AM
Trying to compile simple program, mysql_connect error. anybody help me krisvamc Linux - Software 6 06-20-2007 06:24 PM
Qt program: compile error creolophus Programming 2 08-24-2006 02:53 PM
Compile error in practice program BobNutfield Programming 4 02-15-2006 02:48 PM
c program : compile/link error h/w Programming 2 10-06-2003 09:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:30 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration