I hesitate writing this but I've spend the last two weeks stuck in the same spot.
I am trying to teach myself C to prepare myself for my numerical analysis and programming course. I used Text Wrangler to write a simple program
/* A first program in C */
main()
{
printf("Welcome to C!\n");
}
and saved it as welcome.c on my desktop. I am lost from there. I have installed the xcode package off of apple's website to get the gcc but can't get anywhere with it. I get this
Last login: Mon Jan 5 17:43:14 on ttys002
Nathans-Computer:~ Nathan$ gcc
i686-apple-darwin9-gcc-4.0.1: no input files
Nathans-Computer:~ Nathan$
and then this
Nathans-Computer:~ Nathan$ gcc /Users/nathan/Desktop/welcome.c
/Users/nathan/Desktop/welcome.c: In function main:
/Users/nathan/Desktop/welcome.c:5: warning: incompatible implicit declaration of built-in function printf
Nathans-Computer:~ Nathan$
Maybe i'm just confused on what I'm supposed to do. I have no problem with the code, I just get lost at the compile step.
Thank you for any help and your patience.
I am trying to teach myself C to prepare myself for my numerical analysis and programming course. I used Text Wrangler to write a simple program
/* A first program in C */
main()
{
printf("Welcome to C!\n");
}
and saved it as welcome.c on my desktop. I am lost from there. I have installed the xcode package off of apple's website to get the gcc but can't get anywhere with it. I get this
Last login: Mon Jan 5 17:43:14 on ttys002
Nathans-Computer:~ Nathan$ gcc
i686-apple-darwin9-gcc-4.0.1: no input files
Nathans-Computer:~ Nathan$
and then this
Nathans-Computer:~ Nathan$ gcc /Users/nathan/Desktop/welcome.c
/Users/nathan/Desktop/welcome.c: In function main:
/Users/nathan/Desktop/welcome.c:5: warning: incompatible implicit declaration of built-in function printf
Nathans-Computer:~ Nathan$
Maybe i'm just confused on what I'm supposed to do. I have no problem with the code, I just get lost at the compile step.
Thank you for any help and your patience.