I'm talking about a functionality such that you can just quickly open a .cpp file (C++ console application, nothing regarding Apple ecosystem), work on it, compile and run, without all the project creating mumbo-jumbo. When I open a file with code, all the "Product" options are greyed out for me but after some googling, I found posts claiming that Xcode 5 was to be the first one offering such functionality. Has it been implemented and it's just available elsewhere or were they false rumors and you still have to create a project and import a file there?
Asked
Active
Viewed 1.2k times
26
-
3If you only have a single source file and need no other frameworks/etc., use the command line instead of Xcode -- _much_ easier that way. – mah Dec 06 '13 at 00:37
-
2actually it's not easier to use the command line. He is asking for an easy, quick way to do it, without having to open another window, remember the syntax for the LLVM compiler, all that mumbo jumbo. and heaven help him if he forgets a certain compiler command. In visual studio it's a simple right click, "Compile". Easy done. Xcode seems downright primitive by comparison. – C.J. May 07 '14 at 15:41
2 Answers
23
In the top menu of XCode "File - Edit - View" you will see Product.
Click Product->Perform Action->Compile "myfile.xxx"
If you want a shortcut for that command, click XCode -> Preferences-> Key Bindings and set one up.

B. Nadolson
- 2,988
- 2
- 20
- 27