LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem when running simple c program (https://www.linuxquestions.org/questions/linux-newbie-8/problem-when-running-simple-c-program-731117/)

ryellamr 06-06-2009 09:13 AM

Problem when running simple c program
 
#include<stdio.h>
int main()
{
printf( "I am alive! Beware.\n" );
}

Did "gcc -c smpl.c " -- compiled successfully

then did "gcc -o smpl.o " -- returning gcc: no input files

even tried "gcc -o smpl " -- returning gcc: no input files

Can any one pls tell me how to make this run successfully..

johnsfine 06-06-2009 09:20 AM

I think what you want is
gcc smpl.c -o smpl

knudfl 06-06-2009 11:57 AM

  • And welcome to Linux Questions.

noctilucent 06-06-2009 02:38 PM

Beware indeed.


All times are GMT -5. The time now is 04:08 AM.