Did you add this new file to the project, or just 'open' it?
Unless you add the file the project, it won't compile.
Hi, this is how I did it and it didn't work
- Xcode->New Project->Command Line Utility->Standard Tools->Choose a name & save it.
- Within the window for this project just initiated, File->New File->C and C++ -> C File-> Choose a name ending with .c for the program I wanna write. This file is sure to be added to the project I created.
- Once in the window for the newly created file, click on the filename ending with .c. Then I clear all the stuffs on the window to make way for the simple program I wrote, then saved it and click "Build and Run" on the "Build" menu. At this point it returned the error as I said in the previous post.
Can you tell me how to run a program from within Xcode? I mean being able not only to write it but also compile, link and run it within Xcode without resorting to another compiler?
In a PC, I use a compiler called Miracle C and I can do everything from writing to building, compiling, linking and running it within this compiler. It even reports any errors if any. My question is whether I can have such a thing with Xcode?
I'm so new to programming, so please excuse me for these silly questions.
Thanks a lot