LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-06-2009, 10:13 AM   #1
ryellamr
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
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..
 
Old 06-06-2009, 10:20 AM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
I think what you want is
gcc smpl.c -o smpl
 
Old 06-06-2009, 12:57 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
  • And welcome to Linux Questions.
 
Old 06-06-2009, 03:38 PM   #4
noctilucent
Member
 
Registered: Jun 2009
Distribution: slackware
Posts: 123

Rep: Reputation: 25
Beware indeed.
 
  


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
unrecognized class file version : when running simple Java program yuubouna Linux - Newbie 1 11-28-2008 12:25 AM
Simple script - check if program is running KrzysieQ Linux - Server 3 02-17-2008 08:48 AM
Problem - A simple C program using Structures manishsingh4u Programming 6 05-15-2006 04:55 AM
simple C program problem speel Programming 14 02-27-2005 06:08 PM
simple C program problem mined Programming 2 05-08-2004 06:42 AM


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