[cfe-users] link order for libtooling

folkert via cfe-users cfe-users at lists.llvm.org
Thu Jul 14 07:12:06 PDT 2016


Hi,

What is the order of the clang libraries when linking?

Currently I'm doing:

clang++ -fno-rtti `llvm-config --cxxflags` \
	iterate.cpp \
	`llvm-config --ldflags --libs --system-libs` \
	-I/usr/lib/llvm-3.8/include -ggdb3 -std=c++11 -I/usr/include/llvm-3.8/llvm/Support -L/usr/lib/llvm-3.8/lib/ -L/usr/lib/gcc/x86_64-linux-gnu/5/ -I/usr/include/c++/5/ -I/usr/include/x86_64-linux-gnu/c++/5/ -I/usr/lib/llvm-3.8/include/ \
	-lclangTooling -lclangFrontend -lclangDriver -lclangSerialization -lclangParse -lclangSema -lclangAnalysis -lclangEdit -lclangAST -lclangLex -lclangBasic -lLLVM -ldl

but this gives me:

/tmp/iterate-66d196.o: In function `getNameAsString':
/usr/lib/llvm-3.8/include/clang/AST/Decl.h:184: undefined reference to `clang::DeclarationName::getAsString() const'

Thanks in advance.


Folkert van Heusden

-- 
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com



More information about the cfe-users mailing list