• Home
  • Basics
  • DSA
  • MAD
  • Concept
  • Practice
  • Misc
  • Tips
  • QA’s
  • Home
  • Basics
  • DSA
  • MAD
  • Concept
  • Practice
  • Misc
  • Tips
  • QA’s
  • #News
  • #APPS
  • #Events
    • #WWDC
    • #I/O
    • #Ignite
  • #Let’s Talk
  • #Interview
  • #Tips

MyCodeTips mycodetips-newlogocopy1

  • Home
  • Basics
  • DSA
  • MAD
  • Concept
  • Practice
  • Misc
  • Tips
  • QA’s
Programming

Run C++ on MAC, But How?

There are an enormous number of development environments for C/C++ programmers or C++ on MAC, some of which are freely available and some of which are commercial products.


This document describes the installation and use of two freely available environments under OS X.

Getting Started

The first thing you need to do is register with Apple:

Apple Developer Center

Then you need to download the Xcode installation files:

Xcode

  • Installation of Xcode Only
  • Installation is fairly straightforward:
  • Install Xcode.
  • You are now ready to start developing in C/C++ using Xcode as your IDE.

Xcode is an IDE developed by Apple themselves to develop apps for macOS and iOS or all other Operating Systems that Apple develops. It also has support for C/C++ built-in. Here, finding a C++ IDE for a macOS system is quite easy. To run a program in C++ in Mac we have to install Xcode or command-line tools for Xcode.

Download and install from Apple Appstore

# 1: Install Xcode software on the machine on which programs are to be written. So after downloading the Xcode application and later on opening it, you will be greeted by the pop-up as shown below

start screen

# 2: Now click on the link “Create a new Xcode project”.

# 3: Again, if there is an existing project you will click on “Open a project or file” or “Clone an existing project” if the project is on source control.

# 4: Click on the macOS tab and then click on the Command-Line app as it the only thing where we can develop apps in C and C++.

selection sreen

# 5: It will now show an interface to give the product or the app a name and the package name as a normal IDE after giving that name there would be a drop-down to select a language. So, instead of swift, you can select C or C++ and click on the Next button.

initialize screen

# 6: Then it will ask for the location of the project on your machine, and, done!, you can open or create a C or C++ file now.

code outline
//
//  main.cpp
//  DemoAPP
//
//  Created by mycodetips on 8/2/21.
//  Copyright © 2021 mycodetips. All rights reserved.
//

#include <iostream>

int main(int argc, const char * argv[]) {
    // insert code here...
    std::cout << "Hello, World!\n";
    
    // Your Code goes here 

    return 0;
}

Happy C++ Coding 🙂

Liked it? Take a second to support Ranjan on Patreon!
Become a patron at Patreon!
  • Click to share on Reddit (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • More
  • Click to share on Pocket (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
Written by Ranjan - 1549 Views
Tags | C, C++, Mac, Xcode
AUTHOR
Ranjan

Namaste, My name is Ranjan, I am a graduate from NIT Rourkela. This website is basically about of what i learnt from my years of experience as a software engineer on software development specifically on mobile application development, design patterns/architectures, its changing scenarios, security, troubleshooting, tools, tips&tricks and many more.

You Might Also Like

thump-plist-settings

What is the Property List or plist in IOS .

July 3, 2021
IOS7 Logo

iphone Interview Questions part-10

June 1, 2013
mycodetips-newlogo2

iphone Interview Questions part-14

June 1, 2013
Next Post
Previous Post

Support us

Subscribe for updates

Join 8,220 other subscribers

Latest Posts

  • YT-Featured-Templates--lld
    What Business Problems Solves in Low Level Design (LLD)
  • SRP-SingleResopnsibility
    SRP : Single Responsibility Principle in Swift and Objective-C
  • Designing Mobile APPS
    Limitation and restriction of designing mobile apps
  • YT-Featured-solidprinciples
    SOLID Principles of Software Design
  • IOS 16 Features
    Latest features in IOS 16
whiteboard

Whiteboard(PRO)

whiteboard

Whiteboard(lite)

alphabets

Kids Alphabet

do2day

Do2Day

  • #about
  • #myapps
  • #contact
  • #privacy
  • #Advertise
  • #myQuestions

.Net Android Blogging Cloud Concept Database DSA ERROR ExcelTips Flutter Interview IOS IOSQuestions JAVA Javascript MAC-OS No-Mouse Objective-c Programming Quick Tips SEO Software Design & Architecture Swift SwiftUI Tips&Tricks Tools Troubleshoot Videos Web Wordpress Xamarin XCode

  • What Business Problems Solves in Low Level Design (LLD)
  • SRP : Single Responsibility Principle in Swift and Objective-C
  • Limitation and restriction of designing mobile apps
  • SOLID Principles of Software Design
  • Latest features in IOS 16
MyCodeTips

©mycodetips.com