Re: [newbie] compile source
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
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
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.