<div>dear Cohen Brian is right!!!</div>
<div>'main' should always declare as either he sugested or can also</div>
<div> </div>
<div>int main( )</div>
<div>{ </div>
<div>/*body*/</div>
<div>return 0;</div>
<div>}</div>
<div> </div>
<div>and trie to compile by issuing following command at terminal:-</div>
<div> </div>
<div>gcc -Wall -o NameOfExecutableFile fileName.c</div>
<div> </div>
<div>and run it:-</div>
<div> </div>
<div>./NameOfExecutableFile</div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 11/1/05, <b class="gmail_sendername">Brian D. McGrew</b> <<a href="mailto:brian@visionpro.com">brian@visionpro.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">You've got a space in your include statement:<br><br>#include <stdio.h><br><br>int<br>main(int argc, char *argv[])
<br>{<br>       Printf("\nHello World!\n");<br>       return(0);<br>}<br><br>Never protoctype main as a void function or else you can't get a return<br>value back to the operating system.<br><br>-brian<br><br>Brian D. McGrew { 
<a href="mailto:brian@visionpro.com">brian@visionpro.com</a> || <a href="mailto:brian@doubledimension.com">brian@doubledimension.com</a> }<br>--<br>> Those of you who think you know it all,<br>really annoy those of us who do!
<br><br>-----Original Message-----<br>From: <a href="mailto:fedora-list-bounces@redhat.com">fedora-list-bounces@redhat.com</a><br>[mailto:<a href="mailto:fedora-list-bounces@redhat.com">fedora-list-bounces@redhat.com</a>] On Behalf Of Dotan Cohen
<br>Sent: Monday, October 31, 2005 11:03 AM<br>To: For users of Fedora Core releases<br>Subject: gcc not compiling<br><br>I'm just getting started in programming C. My first attempt:<br>#include < stdio.h><br>void main () {
<br>   printf("\nHello World!\n");<br>}<br><br>Threw this error:<br>[dotancohen@localhost ~]$ gcc hello.c<br>hello.c:1:20: error:  stdio.h: No such file or directory<br>hello.c: In function 'main':<br>hello.c:3: warning: incompatible implicit declaration of built-in
<br>function 'printf'<br>hello.c:2: warning: return type of 'main' is not 'int'<br>hello.c:4:2: warning: no newline at end of file<br><br>So I googled for "1:20: error:  stdio.h: No such file or directory"<br>and found a post that suggests that the answer to the problem is found
<br>in the gcc manual. So I started reading it, but it is long and I'm not<br>finding anything!<br><br>I think that I'm missing a library stdio.h but I don't know where to<br>find it, and where to put it once I do find it. Or am I completly
<br>wrong? The error message is pretty clear.<br><br>Dotan Cohen<br><a href="http://technology-sleuth.com/question/how_can_i_be_safe_online.html">http://technology-sleuth.com/question/how_can_i_be_safe_online.html</a><br>
<br>--<br>fedora-list mailing list<br><a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a><br>To unsubscribe: <a href="https://www.redhat.com/mailman/listinfo/fedora-list">https://www.redhat.com/mailman/listinfo/fedora-list
</a><br><br>--<br>fedora-list mailing list<br><a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a><br>To unsubscribe: <a href="https://www.redhat.com/mailman/listinfo/fedora-list">https://www.redhat.com/mailman/listinfo/fedora-list
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Sagittarius<br><br>"Darkness of this UNIVERSE has many secrets."