LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Compile C program error (https://www.linuxquestions.org/questions/linux-newbie-8/compile-c-program-error-818299/)

vuhuynh 07-06-2010 12:10 PM

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.

AlucardZero 07-06-2010 12:11 PM

Try installing glibc-devel.


All times are GMT -5. The time now is 05:38 AM.