Clang
lastmod 2026-02-28created 2015-02-2831 edits
Clang is a compiler front end for the C, C++, Objective-C, and Objective-C++ programming languages. It uses LLVM as its back end and has been part of the release since LLVM 2.6.
Its goal is to replace the GNU Compiler Collection (GCC). Development is fully open source and is supported by large software companies such as Google and Apple. The source is available under the University of Illinois/NCSA Open Source License.
The Clang project includes the Clang front end and the Clang static analyzer.
Categories
Troubleshooting
Undefined symbols for architecture x86_64
- Stackoverflow: Undefined symbols for architecture x86_64 - Mavericks
- "undefined symbols for architecture x86_64" on Mavericks OSX
Add -stdlib=libstdc++ or -lstdc++ to the compiler flags.
deprecated-declarations error
On macOS, using a deprecated API may be treated as an error. This is because an option that turns warnings into errors has been applied:
To cancel this option, add the flag below.
See also
vim integration
Favorite site
- clang web site
- Wikipedia (en) description of Clang
- Build Clang On Windows project site
- Clang Compiler User’s Manual
How to install
Getting Started
- [Recommended] Getting Started: Building and Running Clang
- CLANG TUTORIAL PART I: INTRODUCTION 1
- CLANG TUTORIAL PART II: LIBTOOLING EXAMPLE 2
- CLANG TUTORIAL PART III: PLUGIN EXAMPLE 3
- How To Cross-Compile Clang/LLVM using Clang/LLVM
Parser
With GCC
- Stackoverflow: Can Clang compile code with GCC compiled .a libs?
- Stackoverflow: Are llvm-gcc and clang binary compatible with gcc? - particularly mingw gcc on Windows
References
- C++
- C++:Inheritance
- Clang-format
- Clang-format-node
- Clang-python
- Clang-tidy
- Clang:ThreadSafetyAnalysis
- Clangd
- Coc.nvim
- GCC
- GDB
- GDNative
- GNU Binutils
- GNU General Public License
- Ld
- Ld:Troubleshooting
- LLDB
- LLVM
- Objective-C
- Programming
- Sanitizers
- Simple DirectMedia Layer
- Static Code Analysis
- Vim:Plugin
- YouCompleteMe
- Zig