Тёмный

Install GCC on MacOS (with Intel CPU) 

Programming with Dr. Hayes
Подписаться 1,8 тыс.
Просмотров 133 тыс.
50% 1

Homebrew: brew.sh/
See the updated video for installation on Apple Silicon:
• Install GCC on Macs wi...
On the newer Macbooks with the Apple M1, M2, M3 processor, look for g++ in /opt/homebrew/bin

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 249   
@bandhabkumardas9216
@bandhabkumardas9216 3 года назад
after watching a bunch of videos on gcc installation, this clip helped mE out finally. it was so simple. thanks
@meghaathwani-oh5gp
@meghaathwani-oh5gp 4 месяца назад
Hi i am not able to download gcc can you please help me After typing brew install gcc i enter n it show command not found.
@pablofernandez7308
@pablofernandez7308 4 года назад
You resolved to me a big problem. Thank you Dr. Hayes!
@Hamshrocks
@Hamshrocks 5 лет назад
Very brief, concise and straight to the point explanation. Thank you so much
@3freezeen
@3freezeen 2 года назад
Thanks a ton. Most online resources tell you to install Xcode but it is extremely large for my small storage MacBook, now I can simply use brew install gcc without having the big Xcode and can compile my c++ and c files. Hooray!
@ayankumar6156
@ayankumar6156 2 года назад
exactly mate, i had the same problem.
@livtaylor4357
@livtaylor4357 3 года назад
Thank you for getting straight to the point. I needed to install this compiler for CodeLite for my Data Structures class.
@nakhadzakos
@nakhadzakos Год назад
when i type cd /usr/local/bin it says: cd: no such file or directory: /usr/local/bin what i need to do? g++-12 exist
@bluehornet6752
@bluehornet6752 3 года назад
I'm a Linux guy, now working on Mac...so this helped lots. Thanks!
@charlesli8647
@charlesli8647 2 года назад
Great video, I have been struggling with this for the past few hours since I am a beginner programmer and this has very helpful!
@heda_guler
@heda_guler 2 года назад
like me :)
@meghaathwani-oh5gp
@meghaathwani-oh5gp 4 месяца назад
Hey can you help me I an unable to download gcc after typing brew install gcc it shows command not found . What should i do please help me
@nikunjchoudhary6551
@nikunjchoudhary6551 4 года назад
thanks man.It worked!! I am now able to run clion without installing xcode.Saved me a ton of space
@shreeyagautamchettri7071
@shreeyagautamchettri7071 2 года назад
it is said command not found in brew install gcc
@Hipro
@Hipro Год назад
so install brew or update it if u have already
@raihankarimpriyo2004
@raihankarimpriyo2004 2 года назад
Literally am going from using Ableton to soft and tNice tutorials helped trendously as a beginner. Thank you so so much for tNice tutorials!!
@LenaSalazar
@LenaSalazar Год назад
Excellent video, well-detailed, AND works for g++-12!!
@prodevmahi4901
@prodevmahi4901 3 года назад
That solution to clang error: no input files really helped me because this solution is not even available at stackoverflow.
@scienticium
@scienticium 3 года назад
while linking g++-11 to g++ , I got an error saying: operation not permitted. What should I do now. Also I am not seeing the g++-11 directory in the bin directory. It is just g++ and GCC (not with their versions).
@mrryc1
@mrryc1 2 года назад
Very useful learning video. You have solved all my problems with Atom in my MacBook. Thank you.
@samarthgarg8813
@samarthgarg8813 4 года назад
I could not find gcc installed at the location mentioned above. I had already installed Xcode and gcc9.2 using home-brew. Please help
@filipeno1
@filipeno1 4 года назад
Great video and great tips in coments! Thank you so much Dr. Hayes!!
@arupchauhan3151
@arupchauhan3151 Год назад
In April 2023, the path for homebrew gcc is in opt directory, to get the g++ alias set to g++ from clang, just add the full path of g++ file in the ln command.
@alalim1660
@alalim1660 6 лет назад
Thank you very much for the tutorial, Installed successfully. Keep making more video on C++. Looking forward to seeing more videos on C++
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 6 лет назад
My pleasure! Thank you for the kind words!
@hugobarahona5552
@hugobarahona5552 5 лет назад
Thank you so much, excellent video!
@rezin5114
@rezin5114 4 года назад
Just wanted to thank you, it worked :D
@MeetPatel-ps1hh
@MeetPatel-ps1hh 3 года назад
brew install gcc is not working, please help it shows zsh: command not found: brew
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
You need to make sure you install Homebrew first. See the command to past into the terminal from brew.sh/
@NishantsChannel
@NishantsChannel 3 года назад
hey so i did all the steps but i have this error whenever i run my c++ code. "init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17'" I understand I can just write -std=c++17 after g++ but is it possible to just use g++ without writing -std=c++17 everytime i run my code? I'm not sure if this is related to what I installed or not, but if you have an idea to help it would be appreciated. thanks!
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
You will need to add that command until g++ is updated to make the C++17 standard the default. Another option would be to adapt your C++ code so that it doesn't use C++17 features. One more option is to use a compile script like make to automatically pass the desired arguments to g++.
@rafaykhan7376
@rafaykhan7376 Год назад
Hi doctor Hayes. When after installing from the link. When I type brew install gcc. Terminal says 'Command not found: brew'. What to do ?
@aditisingh4952
@aditisingh4952 3 года назад
Sir "cd /usr/local/bin/" this line is not working .....my terminal says "cd: no such file or directory: /usr/local/bin/". And there is no issue when i try to run "brew install gcc"..installation was successful...Please help!!!
@shubhamsagar9153
@shubhamsagar9153 4 года назад
boss.i am having this error....what should i do... Updating Homebrew... Error: The following directories are not writable by your user: /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1 You should change the ownership of these directories to your user. sudo chown -R $(whoami) /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1 And make sure that your user has write permission. chmod u+w /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
I think running the recommended commands in that error output should solve your problem. sudo chown -R $(whoami) /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1 chmod u+w /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1
@nguyenienquocbao523
@nguyenienquocbao523 5 лет назад
Thank you for this video
@pthoppae
@pthoppae 2 года назад
Dr Hayes, How to run gdb? I get this error: Unable to find Mach task port for process-id 38330: (os/kern) failure (0x5). (please check gdb is codesigned - see taskgated(8))
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 2 года назад
You may find this link helpful: stackoverflow.com/questions/13913818/how-to-get-a-codesigned-gdb-on-osx
@gabehcuodsuoitneterp203
@gabehcuodsuoitneterp203 2 года назад
Makes it easier? I had no problem with the old way of downloading and installing things. Impossible is trying to install pip/curl/brew stuff.
@meghaathwani-oh5gp
@meghaathwani-oh5gp 4 месяца назад
Hi can you pleasw help me i am not able to download gcc . brew install gcc i enter n it shows command not found.
@BharathKumar-ff4eg
@BharathKumar-ff4eg 3 года назад
Hey! @Dr.Hayes I have done my part till downloading the GCC using brew. But I am facing problem after that, I am not familiar with my location. And also I have already installed Xcode commands . It would be nice if you look towards this problem. Thank you!
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
Sorry, I do not understand your question. It should be fine to follow this tutorial even if Xcode is already installed.
@drakebyamukama8797
@drakebyamukama8797 2 года назад
hello, i still get this problem "checking whether the C compiler works... no"
@leroyperez1819
@leroyperez1819 3 года назад
I tried to install home brew, and well it says it can’t be found.. And yes I followed the exact instructions and it didnt work for me.
@seita9398
@seita9398 3 года назад
same here :(
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
Was an error message given when you attempted to install Homebrew? Try running the installer again and looking through the output for errors.
@fahadadil2209
@fahadadil2209 2 года назад
@@ProgrammingwithDrHayes yes, there was an error
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 2 года назад
@@fahadadil2209 I recommend trying again and noting the particular error message. Those messages give important information on what went wrong. If you post the exact message here, others may be able to help you.
@unnatisharma8301
@unnatisharma8301 2 года назад
Hey there, I followed the steps you said, however I need to work on vs code and I can't set up the environment I don't why, could you please help me out?
@muhammadumairkhan706
@muhammadumairkhan706 2 года назад
when I follow process and type ln -s g++-11 g++ it shows command ln: g++; File exists after log out when I type command it still shows clan
@anushkaphougat183
@anushkaphougat183 3 года назад
when I am typing brew install GCC brew command is not found Programming with Dr. Hayes
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
This installation of Homebrew must have failed. Retry the previous command found at brew.sh/
@SDE_M.sameem
@SDE_M.sameem 2 года назад
I have MacBook Air M1, Can u please help me how to download gcc compiler on my macBook.
@aditisingh4952
@aditisingh4952 3 года назад
Sir it says ---> zsh: permission denied: /opt/homebrew/Cellar/gcc/11.2.0/bin. What is wrong now? Help sir
@TCMACK
@TCMACK 8 месяцев назад
It worked up till actually installing gcc, as it said command not found when I entered brew install gcc.
@SASUKEUCHIHA-yc6er
@SASUKEUCHIHA-yc6er 3 года назад
its not working when I type brew install gcc its just showing this "command not found"
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
You need to make sure you install Homebrew first. See the command to past into the terminal from brew.sh/
@SASUKEUCHIHA-yc6er
@SASUKEUCHIHA-yc6er 3 года назад
​@@ProgrammingwithDrHayesI tried even after installing the home brew. yet didn't work sir.
@shintaroyoshida7793
@shintaroyoshida7793 4 года назад
Thank you for kind explanation.
@juanjosebaza9052
@juanjosebaza9052 3 года назад
This video helped a lot, sometimes I wonder how people learns this kind of little stuff that are not on the web, I mean, What do they read? or What do they see?
@paulwatterson5992
@paulwatterson5992 2 года назад
Used homebrew installed gcc. There is a gcc in /usr/bin and it has the same inode as clang. I could not remove /usr/bin/gcc to create sym link to real gcc in /usr/local/bin/... sh-3.2# cd /usr/bin sh-3.2# ls -l gcc clang -rwxr-xr-x 76 root wheel 167120 Mar 26 01:21 clang -rwxr-xr-x 76 root wheel 167120 Mar 26 01:21 gcc sh-3.2# rm -f gcc rm: gcc: Operation not permitted sh-3.2# whoami root what is going on??? thanks!
@jonathanbanda7596
@jonathanbanda7596 3 года назад
Thank you so much !!! This helped a lot.
@frenchmike
@frenchmike 5 лет назад
Can you also help me running clang properly. As you probably know on a mac, in x-code my cpp files run fine, they run c++ 11 or 17 no problem . BUT when I try to run clang from the terminal it seems to only run an older version of c++ because for instance if my program has "int num1{}" it's seen as an error. Same problem with other text editors such as Atom or TextMate. What manipulation would I need to do to be able to run the latest versions of cpp from the terminal and text editors?? thank you so much if you can help. I would even do a live call with you and pay you if you can help me
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 5 лет назад
When you run clang, add this argument: -std=c++17 That will work in Clang 5. Use -std=c++1z in Clang 4 and earlier.
@luciferodevil3258
@luciferodevil3258 3 года назад
Hello sir, could you please make a video on how MINGW or GCC can be installed on the new M1 chip? How can I run my code with GCC on my M1? It would help me a lot.
@richatayal1792
@richatayal1792 3 года назад
I also want to knw if ur error is resolved plz help me out
@manjuuday3565
@manjuuday3565 2 года назад
@@richatayal1792 watch tech decode video , how to run c program on mac . I have installed it
@johnd942
@johnd942 Год назад
@@manjuuday3565 Provide the link!
@MsSecretIdentity
@MsSecretIdentity 4 года назад
Hi. When I copied the brew.sh link into the terminal and started the installation it showed up a window that it cant be installed since its not available at the server at the moment? What does this depend on? Thanks!
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
The installer pulls files from github.com and brew.sh. Perhaps the internet connection was lost. Try it again.
@neshz
@neshz 7 месяцев назад
I'm trying to install falcon c++ on Mac how can I do it?
@steamyninja8881
@steamyninja8881 3 года назад
Me: *following the instructions* Instructions: "Alright now logout" Me: *logs out* Also me: oh shit the video
@Missjackieann17
@Missjackieann17 3 года назад
my terminal is asking for sudo access and a password. However, it's not letting me type a password.
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
When typing a password, nothing appears on the screen. Still, the keystrokes are being recorded. Hit enter afterwards.
@saitejakotla6762
@saitejakotla6762 3 года назад
it showing this message: zsh: command not found: brew
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
You need to make sure you install Homebrew first. See the command to past into the terminal from brew.sh/
@basmahal-ahmadi3091
@basmahal-ahmadi3091 4 года назад
So after downloading the gcc, can I write C program and run it in the terminal? I don’t need to download anything else?
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
You can use any text editor to write your C program. You will not need anything else to compile and run your terminal C program.
@MrAzeemulhaq
@MrAzeemulhaq 4 года назад
Hey Dr. Hayes, I followed the steps, ran home brew, ran gcc and then ran the 'ln' command but my terminal is still showing 'clang' upon entering gcc and/or g++. Please provide assistance. Thanks.
@MrAzeemulhaq
@MrAzeemulhaq 4 года назад
i deleted everything and tried again and it worked. g++ is showing g++ not clang
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
Hi Azeem, I am glad you figured out whatever the problem was.
@raghuuvaran
@raghuuvaran 5 лет назад
Hi I'm getting the following error Error: The following formula gcc cannot be installed as binary package and must be built from source. Install the Command Line Tools: xcode-select --instal
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 5 лет назад
Try running that command: xcode-select --install to install xcode and then run: brew install gcc again.
@lindsaygoldberg-custer7868
@lindsaygoldberg-custer7868 2 года назад
Dr. Hayes, when I try to cd to /usr/local/bin/ my terminal says it doesn't exist. Is there another way I can get through that step?
@lindsaygoldberg-custer7868
@lindsaygoldberg-custer7868 2 года назад
Actually, the solution to this problem if anybody else has it too, is to cd /opt/homebrew/bin/ instead of cd /usr/local/bin/
@mandeep_thakur
@mandeep_thakur Месяц назад
@@lindsaygoldberg-custer7868 thanks bro
@tjrhone5379
@tjrhone5379 4 года назад
is there not a site to just be able to down load GCC for Mac. my PC is no longer working and all I use is Mac but I don't understand anything you did because I didn't see where you used the program
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
The application I am using is "Terminal" you can find it using the Spotlight search.
@lailaem8618
@lailaem8618 3 года назад
Hello. I have tried several times to make this work. However, the process fails when I get to "ls" - the output I get is not the same as yours (I bear in mind that the update is 10.2 and not 8.2). When I try to proceed from there typing: ln -s g++-10 g++, I get this response: ln: g++: permission denied. What should I do?
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
If Homebrew properly installed GCC, you should have g++10 displayed in the list when you type ls. If not, that needs to be addressed before adding the link with the ln command. If you do see g++10, then the problem may be that you don't have admin writes to make the link. In that case, you may try adding sudo to the beginning of the command: sudo ln -s g++-10 g++
@lailaem8618
@lailaem8618 3 года назад
​@@ProgrammingwithDrHayes Thank you for your response. I have checked several times if the GCC is properly installed and it is. However when typing ls it g++10 is not displayed, unfortunately. Do you have any idea why that might be? What is displayed on my screen is: Info, Install info, Make info, pdftexi2dvi, pod2texi etc.
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
@@lailaem8618 I may not be much help to you; I haven't experienced a setup like yours. Are you sure you are in /usr/local/bin? Does the compiler run when typing g++10? If not, you will need to rerun the Homebrew step to get it properly installed and confirm there are no errors in the output.
@rfiVictim
@rfiVictim 5 лет назад
I would like to install gcc++ to work with Atom/PlatformIO without interfering with Xcode's use of clang. Is it possible to install gcc++ in a manner (rename/relocate) so that Xcode does not find it?
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 5 лет назад
Yes, Xcode will default to using clang even after installing gcc. There is no need to rename or relocate it.
@rfiVictim
@rfiVictim 5 лет назад
@@ProgrammingwithDrHayes : Thanks, Atom/PlatformIO is working. Still need to try out an Xcode compile.
@dimaarafat4710
@dimaarafat4710 3 года назад
heyy i thought that this compiler will allow me to use the bits/stdc++ library on xcode but it still gives file not found
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
Try compiling from the terminal. If that works, then it may mean that xcode is not using the g++ compiler. I don't use xcode or bits/stdc++, so this is just my recommendation for tracking down the problem. If you figure it out, I would love to hear your solution!
@sjain8853
@sjain8853 5 лет назад
great work using the Hi DPI option for screen so people don't have to fullscreen to see whats going on... not enough do this! thx
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
Thanks! Those little tricks really help.
@funenjoynilaypatel4553
@funenjoynilaypatel4553 2 года назад
i just want to thank u
@jannireambriz5522
@jannireambriz5522 3 года назад
I have a mac and downloaded x code along with the required command line tools but my code blocks doesn't read data from any txt files or display data into txt files, could this fix that or is this another issue? it always says "No such file or directory" but they do exist.
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
Are you saying that g++ doesn't read your files? The files need to have a valid C++ extension like .cpp, not .txt. I recommend you watch my video about compiling your first program. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-hk9yiBfSd8Y.html
@jannireambriz5522
@jannireambriz5522 3 года назад
@@ProgrammingwithDrHayes thank you! , The program does compile other programs but I meant that it is not reading data from txt files like when you use fstream this is for my college course and the professor uses windows but I use a mac so idk what is wrong 😭
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
@@jannireambriz5522 Perhaps your text files are not in the same folder as your executable. Your comment is more related to my video on writing to files ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MMp4zV05R5k.html or reading from files ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QnCVoYnLIg8.html
@khushhalmandal
@khushhalmandal 2 года назад
Can you tell me how to delete gcc compiler please.
@THE_ARJ
@THE_ARJ 3 года назад
i've facing fatal error on running graphics on codeblock on macbook pro
@darshanm8722
@darshanm8722 2 года назад
i am not able to install gcc. it says command not found brew pls help
@tsholofelomokoena
@tsholofelomokoena 2 года назад
Says that for me too
@shahreerahmedalhossain6391
@shahreerahmedalhossain6391 2 года назад
Thank you very much. It worked.
@viralrathod6239
@viralrathod6239 Год назад
thank you so much bro it was great help 😇
@anuradhaedachali
@anuradhaedachali 4 года назад
Thanks a lot, it worked for me
@IbrahimHosen-xl4qr
@IbrahimHosen-xl4qr 3 года назад
how can i ran graphics.h c++ program on codeblocks in my macbook air please sir make a video
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
My videos will focus on standard C++. However, I am sure there are other channels that provide tutorials on third-party libraries.
@yarasaleh9338
@yarasaleh9338 6 лет назад
?I am downloading gcc to use C in Netbeans so should I do the same last steps from 3:31
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 6 лет назад
The last step may make it easier for Netbeans to auto-recognize the compiler. However, I don't think you need to perform the last step. Instead, you can instruct Netbeans to to compile with gcc-8 or g++-8 in your project settings.
@sultanfaturahman9055
@sultanfaturahman9055 3 года назад
I can't write my password on terminal
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
The password is being entered even though it doesn't appear on the screen. After typing it, hit Enter.
@subrinsonia
@subrinsonia 4 года назад
I can't install gcc. Please help me.
@sarahdadoun1
@sarahdadoun1 4 года назад
it didnt work for me either :(
@chaitanyakirti2335
@chaitanyakirti2335 2 года назад
thank you brother.
@denissssss8579
@denissssss8579 5 лет назад
HOW TO INSTALL WITH XCODE PLEASE HELP
@RNV-bj8om
@RNV-bj8om 3 года назад
I think they change the file g++ goes to since when I tried to install gcc, it said ==> Pouring gcc--11.2.0.arm64_big_sur.bottle.tar.gz 🍺 /opt/homebrew/Cellar/gcc/11.2.0 When I looked at your Terminal, it said /usr/local/Cellar/gcc/8.2.0 instead of /opt/homebrew/Cellar/gcc/11.2.0 Therefore, I think that Big Sur has changed the directory it goes to.
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
I have tested this installation process on a fresh installation of Big Sur and can confirm that the g++11 link is still located in /usr/local/bin/. Of course, the other dependencies may be in a different place.
@sdottheara
@sdottheara 3 года назад
@@ProgrammingwithDrHayes On Silicon Macbooks, the directory has changed to /opt/homebrew/Cellar/gcc
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 3 года назад
@@sdottheara That is good to know. Thank you for sharinging!
@BrandonJohnDSarte
@BrandonJohnDSarte 4 года назад
How do you unlink the "g++-9" from the created "g++"?
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
You can remove the link with the command rm /usr/local/bin/g++
@rogerperezlugo6444
@rogerperezlugo6444 4 года назад
I am trying to install (pip install screeninfo) and it gives me the following error (error: command 'gcc' failed with exit status 1)
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
I am not an expert on Python (this video is about installing GCC for C and C++ work). However, you should be able to look at the error input and find out specifically why the gcc compiler failed. Scroll up the output until you see the first error output. Maybe other viewers will have additional Python help.
@rogerperezlugo6444
@rogerperezlugo6444 4 года назад
Thank you
@subrinsonia
@subrinsonia 4 года назад
Hey... I couldn’t do this. When i press the terminal, then come this sentence that i have to update my account. Please help me.
@cl-ze9qu
@cl-ze9qu 4 года назад
I think it's because the account that you're logged in in your mac is not the admin to install this you need admin privilegies
@afridinaseer
@afridinaseer 4 года назад
Hi Dr. Hayes I installed until the step cd/usr/local/bin/ after that I can't go to the bin directory why? can you please help me ...if I type cd/usr/local/bin/ then it doesn't go there..please help me
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
Check that you have a space between cd and the rest of the command. cd /usr/local/bin
@afridinaseer
@afridinaseer 4 года назад
@@ProgrammingwithDrHayes i tried with all options ..kept spaces ...avoided spaces but didn't work. Can i be sure that every body would have the same path that you type i.e cd/usr/local/bin/ or that will be different for everyone? Thanks alot
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
@@afridinaseer The path to GCC should be the same for all macOS users that install it using Homebrew. Regardless, that path should exist on your macOS system.
@afridinaseer
@afridinaseer 4 года назад
@@ProgrammingwithDrHayes thanks sir yes it worked now. sir now i working and using sleep, clrscr(), system("pause") in eclipse using my macbook pro but these functions are not bering supported ...which i declared the directory for this e.g #include or #include then i am also getting directory delaration errow. how to fix these errors. should i do something in eclipse setter so that it should accept the directory declartion in the top or how to fix these errors so that my eclipse allow me to use the clear scree fun, also sleep funtion and as well as system pause fucn.... thanks naseer
@SeanHayesT
@SeanHayesT 4 года назад
@@afridinaseer The code you are describing is Microsoft Windows specific. I recommend avoiding platform specific code. If you would like to pause execution until the user hits enter, try something like this: std::cout
@chamikaekanayaka4562
@chamikaekanayaka4562 2 года назад
Thank you very much!
@juansocool3
@juansocool3 4 года назад
it doest work for me after i type install gcc i get the following: nstall [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2 install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
You must type: brew install gcc Don't forget brew.
@santoshjanakiraman2983
@santoshjanakiraman2983 2 года назад
You're a lifesaver!
@antoni3378
@antoni3378 Год назад
Thank you so much
@mathiasfantoni2458
@mathiasfantoni2458 5 лет назад
I accidentally typed: $ ln -s g++-8 g++ … instead of g++-9 (my version is 9 and not 8) How do I overwrite the link I wrongly set to 8?
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
Remove the incorrect link: rm g++ Then type the correct command.
@mathiasfantoni2458
@mathiasfantoni2458 4 года назад
Much appreciated. Thanks. Awesome videos :-)
@MrAzeemulhaq
@MrAzeemulhaq 4 года назад
@@mathiasfantoni2458 FYI, I made the same mistake on another machine and the solution worked for me as well.
@shubhamchavan386
@shubhamchavan386 3 года назад
does It require Xcode pre installed?
@jeankerby6908
@jeankerby6908 3 года назад
Thank you so much, thank you.
@a.s.l711
@a.s.l711 5 лет назад
how to run in mathematica, how to type in compiler
@peteroycesaldanha1345
@peteroycesaldanha1345 3 года назад
Mine still says clang
@theonlyluisgallegos8840
@theonlyluisgallegos8840 5 лет назад
Will this make gcc the default compiler for Xcode?
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 5 лет назад
I don't think it will make gcc the default compiler for Xcode. It will likely still use clang. However, I am not sure. Can anyone else confirm?
@gilbertmuramira9833
@gilbertmuramira9833 5 лет назад
Hello I have followed the steps but I am typing g++ still I am seeing clang as default
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 5 лет назад
Did you Sign Out of your account and sign back it (or restart you machine)? If that did not work, go back to /user/local/bin/ and confirm that the link you made is pointing to g++-8 by typing ls -l
@gilbertmuramira9833
@gilbertmuramira9833 5 лет назад
@@ProgrammingwithDrHayes thank you I shall tell you what happened
@lizagran5677
@lizagran5677 3 года назад
Thank you!
@zxzvlogs2535
@zxzvlogs2535 3 года назад
Thank you
@amandeepthakur7847
@amandeepthakur7847 4 года назад
4:50 still running clang instead of g++ after following the exact method
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
You may need to sign out of macOS and sign back in.
@atharvavaidya7117
@atharvavaidya7117 4 года назад
doesn't work in Mac OS Catalina , please help!
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
It works for me in MacOS Catalina. At what step are you running into trouble?
@dlsselle
@dlsselle Год назад
praises
@denissssss8579
@denissssss8579 4 года назад
do I need Xcode for that?
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
When installing Homebrew, the "Xcode Command Line Tools" will be automatically installed if they are not already present.
@fayethebusy1279
@fayethebusy1279 3 года назад
ty you're a life saver
@johnd942
@johnd942 Год назад
Great lesson! However, I don't understand the love affair presenters have for 'background noise', aka, rubbish music! It is so distracting.
@Djalxmusic
@Djalxmusic 4 года назад
So How can I add it to Xcode compilers list?!
@ProgrammingwithDrHayes
@ProgrammingwithDrHayes 4 года назад
Sorry, I am not sure. I don't use Xcode.
@nikhil9928
@nikhil9928 2 года назад
command not found bhai
Далее
How To Install GCC On macOS
13:25
Просмотров 8 тыс.
Absolute BEGINNER Guide to the Mac OS Terminal
17:03
Просмотров 762 тыс.
Install GCC on MacOS (GCC-7)
5:50
Просмотров 38 тыс.
The Home Server I've Been Wanting
18:14
Просмотров 12 тыс.
MacOS Sequoia: 30+ INSANE CHANGES (Hands-On)
8:46
Просмотров 285 тыс.
I Switched To Mac, After 15 Years of Windows (BRUH)
10:16
macOS Sequoia - 12 Settings You Need to Change First!
5:36
Everyday things that SLOWLY KILLING your MacBook!
10:35