
On 28 February 2010 20:02, John <jaytee(a)clear.net.nz> wrote:
Many thanks Ronnie that worked...Whooo whoo I am a programmer :) Regards John
Here's my example / suggestions zcat(a)mandela:~$ nano hello.c --- Type the program in the nano editor --- /* hello.c: display a message on the screen */ #include <stdio.h> main() { printf("hello, world\n"); } --- ctrl-X to exit --- zcat(a)mandela:~$ make hello cc hello.c -o hello zcat(a)mandela:~$ ./hello hello, world zcat(a)mandela:~$ Using 'make' rather than 'gcc' gives gcc some sensible default options.. in this case the program that results from 'hello.c' is called 'hello' rather than 'a.out' and as Ronnie already mentioned './hello' to run the program 'hello' which is in the current directory './' If you're going to be compiling anything more complex than a hello world program you may want to install the package 'build-essential' too. -- Disclaimer: By sending an email to any of my addresses you are agreeing that: 1. I am by definition, "the intended recipient" 2. All information in the email is mine to do with as I see fit and make such financial profit, political mileage, or good joke as it lends itself to. 3. I may take the contents as representing the views of your company. 4. This overrides any disclaimer or statement of confidentiality that may be included on your message.