Okay, right now I'm very frustrated, I'm a newbie so bear with me. I've been searching Google and looking for ways to use a gcc compiler, or Xcode (so I can write my first hello, world code and practice examples from the book) for about 3 hours now, with no luck.
I have a book to learn C programming, and I want to write the Hello, world program. Okay, I know how to write it, but I have no idea where to write it or how to execute it. Everybody said Xcode includes a GCC compiler, but where? I clicked on "new project", but still don't see an option for opening a compiler or editor to write my program. One person said it was at /usr/bin/gcc. So I went into finder and I found the gcc file, and double clicked but it doesn't launch an application, it opened a box with a bunch of illegible code in it.
I'm expecting it to launch a "gcc compiler" application, I'm thinking that the gcc compiler is like a text editor that I paste my code into and click "run" or something like that. Errrr, well maybe not.
So then others suggested that newbies forgo the Xcode interface for now and just use a text editor and terminal. Okay, so I downloaded textwrangler. I can type my code into textwrangler, but then what do I do? Where does terminal come in? Where does a compiler come in? One guy said I can type my code directly into the terminal, but I tried that and it doesn't work. As soon as I type #include <stdio.h>, then return, another command line prompts. In terminal, every time I hit enter, a new command line prompt comes up, so I can't write my code in terminal.
Am I supposed to write it in textwrangler, then copy and paste it into terminal?
Everything online tells you what to download and which way is easier, but nobody tells you how to do it! WTF! How do I write in the editor and have the program run in the terminal?
I'm sure everybody thinks this is so easy and it probably is, once you tell me it'll probably seem self explanatory, but a newb has no idea what to do, so it's not easy to figure out on your own.
Maybe I've got this all wrong. This is my first time ever trying to do something like this, but I'm assuming that I can actually type the hello, world program somewhere, then press enter, then the program will run and show the result: Hello, world. But maybe not. If so, where? how? terminal or wrangler? Both? What do I do? I can't find anything online that details these steps.
Thanks, I hope somebody will get me started.
I have a book to learn C programming, and I want to write the Hello, world program. Okay, I know how to write it, but I have no idea where to write it or how to execute it. Everybody said Xcode includes a GCC compiler, but where? I clicked on "new project", but still don't see an option for opening a compiler or editor to write my program. One person said it was at /usr/bin/gcc. So I went into finder and I found the gcc file, and double clicked but it doesn't launch an application, it opened a box with a bunch of illegible code in it.
I'm expecting it to launch a "gcc compiler" application, I'm thinking that the gcc compiler is like a text editor that I paste my code into and click "run" or something like that. Errrr, well maybe not.
So then others suggested that newbies forgo the Xcode interface for now and just use a text editor and terminal. Okay, so I downloaded textwrangler. I can type my code into textwrangler, but then what do I do? Where does terminal come in? Where does a compiler come in? One guy said I can type my code directly into the terminal, but I tried that and it doesn't work. As soon as I type #include <stdio.h>, then return, another command line prompts. In terminal, every time I hit enter, a new command line prompt comes up, so I can't write my code in terminal.
Am I supposed to write it in textwrangler, then copy and paste it into terminal?
Everything online tells you what to download and which way is easier, but nobody tells you how to do it! WTF! How do I write in the editor and have the program run in the terminal?
I'm sure everybody thinks this is so easy and it probably is, once you tell me it'll probably seem self explanatory, but a newb has no idea what to do, so it's not easy to figure out on your own.
Maybe I've got this all wrong. This is my first time ever trying to do something like this, but I'm assuming that I can actually type the hello, world program somewhere, then press enter, then the program will run and show the result: Hello, world. But maybe not. If so, where? how? terminal or wrangler? Both? What do I do? I can't find anything online that details these steps.
Thanks, I hope somebody will get me started.