[cfe-dev] help on Building simple clang application

Seth Burleigh seth at tewebs.com
Thu Jun 10 15:54:09 PDT 2010


THanks, that worked! 
On Thu, 2010-06-10 at 10:01 +0200, Sebastian Redl wrote:
> Seth Burleigh wrote:
> > Woops, automatically pressed enter! lol, heres the code and errors:
> >
> >
> >
> >
> > g++ tut1.cpp -g -fno-rtti `llvm-config --cxxflags --ldflags --libs`
> > -lclangBasic -lclangLex -lclangDriver -lclangFrontend -lclangParse
> > -lclangAST -lclangSema -lclangAnalysis
> >   
> The order of Clang libraries is wrong. A library must be named after the
> libraries that depend on it, so, for example, -lclangBasic must be the
> last lib option, because everything else depends on it.
> I'm not quite sure how the Clang dependencies work exactly, but try this
> command line:
> 
> g++ tut1.cpp -g -fno-rtti
>  -lclangDriver -lclangAnalysis -lclangFrontend
>  -lclangSema -lclangAST -lclangParse -lclangLex
>  -lclangBasic `llvm-config --cxxflags --ldflags --libs`
> 
> Sebastian
> 





More information about the cfe-dev mailing list