How to write Language C or C++ Program on Macintosh OSX using Xcode

I assume that you are on latest Mac with Xocde 5 or later already installed on your mac from Mac App Store.

SO here is how to write Language C or C++ Program Code on Macintosh OSX using Xcode.

Note: Writing a C or C++ specific code only differs on Step 05 every other step is the same.

Step 01 is to Navigate to ‘Application’ folder & double click on ‘Xcode’ Application

OR Click on ‘Spotlight’ at top left menu bar of your Mac & type ‘Xcode’ press return key on keyboard after getting appropriate search results

Step 02 is to select ‘Create New Project’ & click over it or go to File menu > New > Project while Xcode is selected & running

Step 03 You will get Choose Xcode Project Template Dialog box UI

Under OSX on the left side choose ‘Application’ then select ‘Command Line tool’ on right & then click on Next button

On Step 04 you will be given to input Product Name, Organisation Name, Company Identifier.

You can choose any name desired for your Product name i.e. Application Name

For Organisation Name choose any desired or your organisation name.

for Company Identifier you shoul write your organisation’s website URL in reverse order as development etiquette e.g

Step 05

Under same screen & dialogue box as Step 04 you will have to choose your Project type. So for Language C Project choose C under Type drop down menu & for C++ Project choose C++.

Step 06

Now you will get Save Project Dialog box, Click on ‘Desktop’ on left, now click on Create new Folder button at bottom choose that folder & Click on ‘Create’

Note: You can uncheck or check ‘Create git repository on My Mac’ as you desire that is not important as of now.

Step 07: Now you will presented with Project Settings Page

Step 08: Select appropriate ‘main.c’ (If you have chosen Language C in Step 05) or ‘main.cpp’ (If you have chosen Language C++ in Step 05) at sidebar & you are good to go to start writing your code

Hope this help you to get going to start coding…

Thanks & Regards
Mandar Apte

Published by Mandar Apte

Mandar is a Mumbai-based multi-disciplinary designer with UX/UI, Logo, Symbol, and Brand Identity design expertise. He currently runs his Mudrkashar Linguistic Apple iPhone, iPad, and Mac app business in the heart of Mumbai city.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.