본문 바로가기

개발

Could not find compiler set in environment variable CXX: x86_64-apple-darwin13.4.0-clang++ 에러 해결 방법

728x90

MAC 에서 개발을 하다 보면 여러 라이브러리를 build 하다가 설정이 꼬이는 경우가 발생한다. 이런 중 clang 을 설치 하였는데, 설치가 되지 않았다는

 

Could not find compiler set in environment variable CXX: 
x86_64-apple-darwin13.4.0-clang++.

에러가 발생하기도 한다.

 

CMake Error at /usr/local/Cellar/cmake/3.14.3/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake:48 (message):
Could not find compiler set in environment variable CXX:x86_64-apple-darwin13.4.0-clang++.
Call Stack (most recent call first):CMakeLists.txt:135 (project)
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguageCMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

이 에러의 해결 방법은 간단하다. 아래와 같이 환경 변수를 설정하면 된다.

export CXX=g++ CC=gcc

 

 

아주 쉽게 해결이 된다~~:)