

Hit the play button to build and run or use command+r. It's all perfectly straightforward if Xcode were the only lens through which you were ever going to view a code base, otherwise it's a hassle.īut, supposing you have it installed anyway because it's the easiest way to get Clang onto a Mac, basic instructions are: "File -> New -> Project.", select "Command Line Tool", select 'C++' as the language on the next screen and provide a product name/etc, pick a directory and hit 'Create'. Xcode isn't difficult to learn, but it includes some really odd choices, especially around file management - the folders and files listed in your project are those you have added to and arranged within your project, which may or may not correlate to their on-disk structure. My current and one of my previous employers have both offered it via site licence so it's not so uncommon, but it's a subscription thing so I wouldn't recommend it in any other scenario. If someone else is paying then also worth considering is CLion which is the JetBrains instance suitable for C++. It seems I bought it way back in 2012 when it was only £7, and my licence is still valid and has carried forward to the latest version so it's been one of my better investments. But it's far-and-ahead my go-to for single-file quick hacks.
DO I NEED XCODE FOR ECLIPSE C++ MAC FULL
You can also set it up to invoke whatever you want to invoke for building, allowing you to use it as a full project-management IDE, but I usually don't bother with that.

I'm going to presage this by saying that if what you want from an IDE is that you can open a tab, tap in some C++, add some breakpoints if necessary and hit run, and if you're willing to spend $20, then I highly recommend CodeRunner.

I have a longstanding severe dislike of Eclipse but that's longstanding in the sense of "hasn't been reevaluated in probably a decade" so I can't say for certain that it's still well-founded. I use Xcode in my free time, VS Code as part of my job, both under macOS.
