Making a Standalone c++ (app) with Xcode... please help

Hi. I am trying to learn c++, using some books and the internet. I made my first program, which converts celsius to farenheit and vice vera (amazing, I know). I used Xcode, and obviously, it runs in the Xcode app itself, in the little interface panel (or whatever it is called).


Now, my question is, how, and how far into learning c++ does this sort of thing come into play, do you make your own 'app', or it's own 'window'?

For instance, I would like to eventually make a game, but I cannot have my game running in Xcode, I want it running by itself, like games you buy for the computer.


I realize if I stray away from the books I am reading, and learn things ahead of my level, it will ruin the learning process, but I really want to know how to do this.


Thanks.

Posted on Mar 9, 2013 9:29 PM

Reply
3 replies

Mar 10, 2013 9:33 AM in response to evan9

What type of app did you make? When you create a project in Xcode you decide how the program will run.


Was it a command line tool? Command line tools run when their name is entered at the prompt in the Terminal window.


If you want to create an app that has a GUI interface you would choose a project type of Cocoa Application.


Once the programs ready to be released, run outside of Xcode, you would use the Xcode command Archive. This remove s the debugging code from the program gives you a version that can be run outside of Xcode.


You should spend some time becoming really familiar with Xcode. What you learn will make your programming easier and more enjoyable (if you're not fighting your tools the work process is always easier, no matter if the tool is a saw or Xcode) and will carry over to any language that you use Xcode to code for.


regards

Mar 10, 2013 10:04 AM in response to Frank Caggiano

Yes, it was command line tools.


I wonder though, I tried archiving it, and even running it for 'release' mode, but I have no idea where the file that is made goes (assuming it makes a file as a standalone 'app'). Whenever I make a simple C++ program, it gives me a folder with the 'nameofproject'.xcodeproject, the main.cpp, and the 'nameofproject'.1, and I run the program from the .xcodeproject file.


Where does the final program go after archiving/releasing it? And, what is the extension/how does it run? You eventually need to code for a GUI interface and everything, correct? (such as making a simple menu/game for an RPG game or something...)


But, how would you do it without Cocoa, like, if I wanted my game/app to be played on Windows and Mac?



This stuff is amazing, thanks for the help!

Mar 10, 2013 2:12 PM in response to evan9

Well, looks like my best bet is going to be using Obj-C. Which is fine, becuase I am on a Mac, so I really shouldn't care about it being cross platform (it's not like I am trying to make money). But, my only question is, can I make my 'source' codes (or whatever proper name) in C++ (since I know it a little) and have that appear in my Cocoa Obj-C .app?


Thanks.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Making a Standalone c++ (app) with Xcode... please help

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.