-
Installing the GCC(C++ Compiler in macOS)& ❤️Apple M1 프로세서가 탑재된 최신 MacBook의 경우(경로코딩Coding/make★gcc★&g++★clang★compiler 2021. 12. 20. 00:54728x90
저는 M1맥프로 에서
XCode를 앱스토어 받았습니다.
거기에 C++,GCC컴파일러 다 있습니다.
XCode 12G기가라 설치 엄청나게 오래 걸립니다.
너무 오래 걸려서 컴퓨터 멈춘줄 알았습니다ㅋㅋㅋㅋ.
cpp파일 컴파일 후 실행하기
g++ test.cpp ls 컴파일이 잘 되었는지 확인!! 파일명 "a.out" ./a.out 실행됨. g++ -o hello cpp01.cpp 컴파일 완료 되고, hello라는 파일 만들면서 실행 가능 ./hello 하면 실행 됨
clang
clang이 오류가 더 자세히 나오는 것 같음 ㅎㅎclang -o hello hello.c 컴파일 완료 되고, hello라는 파일 만들면서 실행 가능 ./hello 하면 실행 됨
clang과 gcc차이점 설명
& aaple이
GCC 에서 LLVM으로 이동하는 이유..https://m.blog.naver.com/PostView.naver?blogId=stupidus85&logNo=70133129470&proxyReferer=
GCC vs LLVM
gcc란? GNU(GNU is Not Unix) 프로젝트의 프리웨어(freeware) 컴파일러. 본래 C 언어용 컴파일러...
blog.naver.com
Chapter 2. clang Red Hat Developer Tools 2018.4 | Red Hat Customer Portal
Access Red Hat’s knowledge, guidance, and support through your subscription.
access.redhat.com
https://www.youtube.com/watch?v=qQ40Wd6H3EQ&t=168s
또는
이 영상은 Compile C++ on Mac
https://youtu.be/gnq8VUGRV68
c언어 컴파일 후 실행하기gcc -o filename.out filename.c
gcc -Wall -save-temps main.c -o harry
- -Wall: This will check not only for errors but also for all kinds warning like unused variables errors, it is good practice to use this flag while compiling the code.
- -Wall : 이것은 오류뿐만 아니라 사용되지 않는 변수 오류와 같은 모든 종류의 경고도 확인할 수 있으므로 코드를 컴파일할 때 이 플래그를 사용하는 것이 좋습니다
11분 31초
https://youtu.be/5SIBB589fAg?t=691
https://www.geeksforgeeks.org/gcc-command-in-linux-with-examples/gcc command in Linux with examples - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
www.geeksforgeeks.org
c언어 컴파일러 설치
https://www.youtube.com/watch?v=pdfLW9PSrhQ
https://www.youtube.com/watch?v=FGSlg8L5kf0
Tutorial : How to install GCC in MacOS for C programming
https://youtu.be/h-PkXGI-fwEHomebrew
The Missing Package Manager for macOS (or Linux).
brew.sh
Apple M1 프로세서가 탑재된 최신 MacBook의 경우
/opt/homebrew/Cellar/gcc
M1 pro에 C++ 11
https://youtu.be/wY24ehH6mC0
VSCode Install & run C/C++
https://youtu.be/YuutFT6Yhic
C++17
Clang 설치
https://youtu.be/f0vVV4NPmjQ
다른 글 보기
CPP]GCC(1) - Linux manual page - https://economiceco.tistory.com/m/11652CPP]GCC(1) - Linux manual page
https://man7.org/linux/man-pages/man1/gcc.1.html gcc(1) - Linux manual page man7.org 다른 글 C언어 컴파일 후 실행 하기 https://youtu.be/FGSlg8L5kf0 CPP 컴파일 https://youtu.be/qQ40Wd6H3EQ
economiceco.tistory.com
내가 만든 영상
C언어 컴파일 하기 33분23초
C++컴파일 하기 34분 34초
https://www.youtube.com/watch?v=BGuQb8Vf6C4&list=PLcMveqN_07maeDuKrsf5GYMDB5obTWoWg&index=37
여러개 파일
C++컴파일 하기
.h
해더파일과 c++파일 연결 후
목적어 파일 만든 다음
컴파일 해야함
1시간21분18초부터 보면 됩니다.
https://www.youtube.com/watch?v=_VfKIEUca_4&list=PLcMveqN_07maeDuKrsf5GYMDB5obTWoWg&index=26
다른글 보기
C++ 20
[C++20] 컴파일 - (g++ main.cpp -g -std=c++20
https://economiceco.tistory.com/12473[C++20] 컴파일 - (g++ main.cpp -g -std=c++20
g++ main.cpp -g -std=c++20 파일 이름은 main.cpp 로 해야하나봄 ------------------------------------ 파일 여러개 일때? g++ -g -std=c++20 -o *.cpp --------------------------------------- g++ -g -std=c+..
economiceco.tistory.com
g++ main.cpp -g -std=c++20
다른글 보기
macOS-홈브류Homebrew란? 맥북엔 홈브루 최고 ! 이거 모르면 개불편 ㅜㅜ 못 살아 ㅋ
https://economiceco.tistory.com/12618macOS-홈브류Homebrew란? 맥북엔 홈브루 최고 ! 이거 모르면 개불편 ㅜㅜ 못 살아 ㅋ
https://www.44bits.io/ko/keyword/homebrew#%ED%99%88%EB%B8%8C%EB%A5%98-%EC%BA%90%EC%8A%A4%ED%81%ACcask 홈브류(Homebrew)란? 홈브류(Homebrew)는 맥스 호웰(Max Howell)이 주도해서 개발한 맥OS, 리눅스 용..
economiceco.tistory.com
다른 글
(내용 더 좋음 ❤️)
gcc로 컴파일 하는 방법 -
❤️ gcc가 실행시키는 프로그램- cpp 전처리기
- cc1 컴파일러
- as 어셈블러
- ld 링커
https://seamless.tistory.com/m/2
gcc로 컴파일 하는 방법
1. gcc 동작 과정 gcc 원래는 GNU C Compiler를 의미 했지만 1999년부터 GNU Compiler Collection을 의미한다. gcc가 실행시키는 프로그램 cpp 전처리기 cc1 컴파일러 as 어셈블러 ld 링커 1) 전처리 단계 소스 파..
seamless.tistory.com
C++]gcc로 컴파일 하는 방법
(./ a.out 검색하다가 알게 됨) -
https://economiceco.tistory.com/m/11362C++]gcc로 컴파일 하는 방법(./ a.out 검색하다가 함)
https://seamless.tistory.com/m/2 gcc로 컴파일 하는 방법 1. gcc 동작 과정 gcc 원래는 GNU C Compiler를 의미 했지만 1999년부터 GNU Compiler Collection을 의미한다. gcc가 실행시키는 프로그램 cpp 전처리기..
economiceco.tistory.com
반응형'코딩Coding > make★gcc★&g++★clang★compiler' 카테고리의 다른 글
GCC - compilation en C/C++(프랑스어라 자동번역 해야함) (0) 2022.02.18 how to use c++20 / g++ -std=c++11 -o test test.cpp (build.sh❤️파일 만드는법) (0) 2022.02.18 GCC 오류 설명서 (0) 2022.02.18 ln: g++: File exists /(이렇게 에러나면)What is a "failed to create a symbolic link: file exists" error? (0) 2022.02.18 gcc-g memory.c -o memory ./valgrind .memory (bash) (0) 2022.02.05 C언어에서 gcc -Wall -save-temps main.c 하면 나오는 파일들main.o / main.i / main.s (0) 2022.01.27 Ubuntu]GCC를 사용하여 C프로그램 캄파일 후 실행 하기& Upgrade gcc and g++ in Ubuntu (0) 2021.12.20 C++]gcc로 컴파일 하는 방법(./ a.out 검색하다가 알게 됨) (0) 2021.11.29