I haven't used Xcode in awhile and overall new to macs. How od I run a C++ program from Xcode V5.02. I don't see a command line function anymore?
相关问题
- Xcode debugger displays incorrect values for varia
- Image loads in simulator but not device?
- importing files from other directories in xcode
- XCode Server: Opening import file for module '
- create tableview inside tableviewcell using swift
相关文章
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Popover segue to static cell UITableView causes co
- “Storyboard.storyboard” could not be opened
- didBeginContact:(SKPhysicsContact *)contact not in
-
The file “
.app” couldn’t be opened becaus - How do I set compatible devices to only ARKit comp
Xcode supports c++ in
objective-c
projects through.mm
files, but not on its own.UPDATE: Guess I was wrong, see here: http://neilmonday.blogspot.com/2008/02/how-to-compile-basic-c-programs-in.html and here: How do I create a new C++ project in XCode?
Run
xcode-select --install
to make sure you command line tools installed on the system.See this SO answer for help with command line tool installation.
Basically the terminal
command is
The other option is to create a C++ Command Line tolls project.
In Xcode, select File>New>Project. Then navigate to the Application tab under OS X. The last choice will be "Command Line Tool". Hit Next. Then, select C++ in the type pulldown menu at the bottom. Name your project, hit next, choose a place to save, and click Create. You will see a file called main.cpp. Select it, and you're ready to go!