Skip to content

Clang

클랭(Clang)은 C, C++, 오브젝티브-C, 오브젝티브-C++ 프로그래밍 언어를 위한 컴파일러 프론트엔드이다. LLVM을 백엔드로 사용하며 LLVM 2.6 이후로 릴리즈의 일부로 자리잡았다.

목표는 GNU 컴파일러 모음 (GCC)를 대체하는 것이다. 개발은 완전히 오픈 소스이며 구글, 애플 등 대형 소프트웨어 기업의 지원을 받고 있다. 소스는 일리노이 대학교/NCSA 오픈 소스 라이선스로 이용할 수 있다.

클랭 프로젝트는 클랭 프론트엔드와 클랭 정적 분석기를 포함한다.

Categories

Troubleshooting

Undefined symbols for architecture x86_64

컴파일러 플래그에 -stdlib=libstdc++또는 -lstdc++를 추가하면 된다.

deprecated-declarations error

macOS에서 Deprecated API를 사용할 경우 에러로 처리할 경우가 있다. 이 것은 경고를 에러로 바꾸는 옵션을 적용했기 때문이다:

-Werror=deprecated-declarations

이 옵션을 취소하고 싶다면 아래의 플래그를 추가하면 된다.

-Wno-error=deprecated-declarations

See also

vim integration

Favorite site

How to install

Getting Started

Parser

With GCC

References


  1. Clang_Tutorial_Part_I-Introduction-Bits,_Bytes,_Boos.pdf 

  2. Clang_Tutorial_Part_II-LibTooling_Example-Bits,_Bytes,_Boos.pdf 

  3. Clang_Tutorial_Part_III-Plugin_Example-Bits,_Bytes,_Boos.pdf