Quick Way to Compile C++ on Mac 2020 - G++ Guide [No XCode]

preview_player
Показать описание
This is a quick and easy way to write and compile C++ programs on Mac, without having a huge XCode Installation! We're going to be using the free, open-source GNU G++ Compiler instead.

00:00 - Introduction
00:08 - Install G++ via Command Line Tools
00:51 - Verifying G++ is Installed
01:16 - Writing C++ (.cpp) Programs
02:10 - Compiling and Executing C++ Programs

-————————————————————————————————————-
C++ is a general-purpose programming language created by Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significantly over time, and modern C++ now has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation. It is almost always implemented as a compiled language, and many vendors provide C++ compilers, including the Free Software Foundation, LLVM, Microsoft, Intel, Oracle, and IBM, so it is available on many platforms.

C++ was designed with a bias toward system programming and embedded, resource-constrained software and large systems, with performance, efficiency, and flexibility of use as its design highlights. C++ has also been found useful in many other contexts, with key strengths being software infrastructure and resource-constrained applications, including desktop applications, video games, servers (e.g. e-commerce, Web search, or SQL servers), and performance-critical applications (e.g. telephone switches or space probes).

NOTE: I am not a teacher by any means, these videos are just to help me improve my understanding.

Thanks for Watching!
Рекомендации по теме
Комментарии
Автор

Thank you! All the tutorials I found were about downloading command line tools but never about how to actually compile them. I've spent far too long looking for a way to actually run my code and now I can actually start learning my first programming language!

samsungrefrigeratorcondens
Автор

seriously this method works with my m1 macbook air :). thanku so much for shareing

kunalsoni
Автор

You sir, are a born teacher! Most BS free thing I have ever seen! Couldn't subscribe fast enough!

Trident
Автор

Love VS code, but on M1 chip it cant read c++17 standard, super annoying since it compiles fine on the cmd line. Tried everything but stuck in Xcode to do at every site to fix, still cant get VS code to recognize c++17 std, , , , super annoyed, , , ,

ps-riqk
Автор

Hi bro, could you teach us how to compile c++ code and make it into an mac os app. I subbed Thanks

vdofficialchannel
Автор

You only need the ./ for running the executable, not while compiling.

FredrikAttebrant
Автор

Hi I wanna know what is the best compiler for c++ in Mac os?

MOMINAF
Автор

Thank you Ganesh. Most helpful video on the subject

JiminyCrickey
Автор

finally useful info, everyone's saying to just develop in xcode while everytime you build it generates 8gb of BULLSHIT

xbz
Автор

How much internet will it take on install g++

prafulaggarwal
Автор

So I'm trying to learn C and get set up. When I typed g++ I got this error: clang: error: no input files

Was wondering if you know whats up with it?

goldendays
Автор

There is no need for Homebrew or anything via this method?

Also are there any reasons to do it using the Homebrew method?

chroniclesofme
Автор

bRO An Error is Coming While Typing AN d Enter G++

joshuakishore
Автор

You are completly worng here. First you are still using the XCode developer tools. at 1.00 you can see that you are not actually using the GCC. Instead you are actually using clang which apple deviously put.

ishanhegde
Автор

I realized this: I already did everything true except for writing "./" front of my exe...
So, thank you for this video.

smhcbr