0

I followed some youtube tutorials before actually downloading Xcode and trying things myself, and while they have been very in learning the basics of C++ on the coding side of things, none of the videos explained how to actually set up or run files and now that I have it downloaded I can't get anything to run (FYI I am using Xcode v8.2.1.) The "run" option is greyed out in the top product menu.

I found this thread but the accepted answer derails for me by point 2 because when I open Xcode and start a new file I have no option to select the command line tool, which apparently solved OP's problem.

So I basically just want to create some "Hello world" text and output it somewhere but I can't. Can someone give me a simple rundown of how I can get started?

Community
  • 1
  • 1
  • 1
    If you want to create a simple command line app, don't use iOS templates, use macOS templates. – rmaddy Jan 05 '17 at 00:12
  • Yikes, yeah I thought I had been selecting maxOS, but apparently I wasn't creating new files correctly because I found the window I was looking for. Thanks. –  Jan 05 '17 at 00:16
  • If you want to run C++ code in XCode for iOS development. You should call it in .mm file. Create a ViewController.mm and print the text using std::cout. Let me know if this is not what you're looking for – KrishnaCA Jan 05 '17 at 06:14
  • @KrishnaCA the problem was that I was creating files incorrectly and therefore didn't have the same options for selecting the command line tool. Thank you for the info. –  Jan 05 '17 at 21:00

0 Answers0