Re: [newbie] compile source

2000-12-08 Thread Jim Crossley

Jon Doe wrote:
 
 I have a file that is just source code "somefile.c" how would I compile this?

The simplest way is to use 'cc'.  Assuming somefile.c looks something
like this,

main() {
  printf ("Hello Merle\n");
}

You can feed it to cc like this:

$ cc somefile.c

That will either complain about syntax errors or generate an executable
file called 'a.out'.  You can execute your program like this:

$ ./a.out

It will then greet you as if your name were Merle.

-- Jim
http://www.lads.com/~jim




Re: [newbie] compile source

2000-12-08 Thread Jon Doe

On Friday 08 December 2000 11:24 pm, you wrote:


 The simplest way is to use 'cc'.  Assuming somefile.c looks something
 like this,

 main() {
   printf ("Hello Merle\n");
 }

 You can feed it to cc like this:

 $ cc somefile.c

 That will either complain about syntax errors or generate an executable
 file called 'a.out'.  You can execute your program like this:

 $ ./a.out

 It will then greet you as if your name were Merle.

 -- Jim
 http://www.lads.com/~jim

Thanks Jim! Worked like a charm

-- 
Registered Linux User 181996
ICQ 27396393




Re: [newbie] compile source

2000-12-08 Thread Anthony

gcc -o somefile somefile.c

Then execute the file by typing "./somefile"

 I have a file that is just source code "somefile.c" how would I compile
 this?

-- 
Anthony
http://binaryfusion.net
Press any key to continue, or any other key to quit.