First basic program

Samuel T. Santos samuel9811862@uniceub.br
Mon Feb 24 11:05:00 GMT 2003


Hello guys!

I run my first program using GCC for Linux! the basic but not boring
Hello World! hehehe

I create a file with VI editor and I wrote the code
and to compile I use "gcc HelloWorld.c"

to messages was show:

HelloWorld.c: In function `main':
HelloWorld.c:4: warning: return type of `main' is not `int

and the Gcc compiler create a file call "a.out*"

My doubts are: 
	First: to declare the main function I must use the type "int"?

	Second: Why GCC create a file call "a.out*"? Why the file call
"HelloWorld*"? How I do that? Its don't generate some intermediate file?

	Third: What the common options I use to compile a program?

	Fourth: Where I look to see all functions available by GCC?

I use Mandrake 9.0

my code was that:

#include <stdio.h>

void main(void)
{
	printf("\t\t\t Helllllooo LINUX World!!\n");
}


til next! :)

	Sams



More information about the Gcc-help mailing list