LinuxQuestions.org
Visit Jeremy's Blog.
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 05-14-2004, 04:50 AM   #1
tiang_ono
LQ Newbie
 
Registered: Apr 2004
Location: indonesia
Distribution: red hat 9
Posts: 21

Rep: Reputation: 15
stupid question about gcc


hi all,

i start to learn c programming in linux. i tried the program called hello.c

include <stdio.h>

main()
{
printf ("Hello World\n");

}

and i compiled with gcc -o hello hello.c
but the hello couldn't be executed.

could anybody help me ?
thx
 
Old 05-14-2004, 07:34 AM   #2
JJX
Member
 
Registered: Mar 2004
Location: Greece
Distribution: Debian
Posts: 345

Rep: Reputation: 31
try "#include <stdio.h>"
[u forgot the #]
it will run
 
Old 05-16-2004, 09:05 PM   #3
tiang_ono
LQ Newbie
 
Registered: Apr 2004
Location: indonesia
Distribution: red hat 9
Posts: 21

Original Poster
Rep: Reputation: 15
sorry, i forgot the #
it still doesn't work.
somebody told me that the problem probably in the path setting, but i don't know how to solve it
 
Old 05-16-2004, 09:24 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,430

Rep: Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938
"Command not found" error?
./hello

./ is a shortcut for current working directory. Unlike windows the shell does first search the current directory before searching the path.
 
Old 05-16-2004, 10:03 PM   #5
tiang_ono
LQ Newbie
 
Registered: Apr 2004
Location: indonesia
Distribution: red hat 9
Posts: 21

Original Poster
Rep: Reputation: 15
it works, thx
 
  


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
Stupid, stupid question; I lost Klaptop. :( Surfrider Slackware 2 08-31-2005 10:12 PM
This' gonna sound stupid but... here it is... about GCC version... ParticleHunter Linux From Scratch 2 09-27-2004 04:06 AM
Stupid Dumb Stupid Question... drigz Linux - Software 3 09-23-2004 04:09 PM
Stupid GCC! dogn00dles Programming 1 05-19-2003 08:27 PM
another not so stupid question. Thetargos Linux - Software 2 04-01-2003 02:35 PM

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

All times are GMT -5. The time now is 03:32 PM.

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