gcc command

I‘m trying to compile mini_sendmail as described here. But I’m getting the following error after tying the make command:

gcc -O -c mini_sendmail.c
gcc -O -s -static mini_sendmail.o -o mini_sendmail
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [mini_sendmail] Error 1

How do I fix this problem under RHEL 6?

{ 3 comments }

How you can run a c program in Linux?

by Vivek Gite on October 16, 2007 · 3 comments

Q. I’ve a c program and I’d like to run in Linux. A. C program need to compile and run in Linux using cc or gcc command. When you invoke GCC (GNU C Compiler), it normally does preprocessing, compilation, assembly and linking for you. For example to compile hello.c program , type the following command: [...]

{ 3 comments }

How do I compile C program and create an executable file under Linux or UNIX operating systems?

{ 50 comments }