LibClang

Page Contents

References

Getting LibClang & Linking Against It

To install LibClang on Ubuntu is super easy:

sudo apt install libclang-9-dev

To link against it is just as easy:

CLANG_INC_DIR=/usr/lib/llvm-9/include
CLANG_LIB_DIR=/usr/lib/llvm-9/lib
LDLIBS=-lclang -lstdc++
LOADLIBES=-L$(CLANG_LIB_DIR)
CXXFLAGS+=-I$(CLANG_INC_DIR)