Is there a way to compile a single file in Xcode 5?

I’m talking about such functionality that you can simply quickly open a .cpp file (C ++ console application, nothing concerning the Apple ecosystem), work on it, compile and run it without any project creating mumbo-jumbo. When I open the file with the code, all the "Product" parameters are highlighted for me, but after some search queries I found messages stating that Xcode 5 was supposed to be the first to offer such functionality. Was it implemented and it was just available elsewhere or were there false rumors, and you still need to create a project and import the file there?

+7
xcode xcode5
source share
2 answers

In the top Xcode menu “File - Change - View” you will see “Product”.

Click Product - Take Action - Compile myfile.xxx

If you need a shortcut for this command, click Xcode → Preferences-> Key Bindings and install one of them.

+7
source share

Or if a shortcut is required: CTRL + COMMAND + B.

+6
source share

All Articles