Reg :: Clang Linking

Dear All,

I am very new to Clang and LLVM. I am very interested in Clang API feature.

I have some trouble in linking some Clang API codes I downloaded from internet.

The code is failing with compile and linker flags derived from:

llvm-config --cppflags --ldflags --libs all

My questions are,

  1. when I compile clang and llvm can I link them to only two separate archives ?

  2. Where do I get a good document on Clang API usage.

The script :

set LFLAGS=/home/****/llvm_local_install/bin/llvm-config --cppflags --ldflags --libs all

clang++ -v ${LFLAGS} clan_ex.cpp -lpthread