On 11/02/14 03:28, Dmitri Gribenko wrote:
On Tue, Feb 11, 2014 at 4:15 AM, Adrian Ortega <[email protected]> wrote:
$> clang++ `llvm-config --ldflags` main.o `llvm-config --libs`
It fails with the following output (I just put the first error to not
clutter this post):
main.o: In function `main':
main.cpp:74: undefined reference to `clang::TextDiagnosticPrinter::Text!
I'm afraid llvm-config does not know anything about clang libraries,
they need to be added separately. Alternatively, it would be nice if
we had clang-config (or a similar utility).
Dmitri
I looked at an example from the Makefiles clang/tools, and the final
command line was
clang++ `llvm-config --ldflags` main.o -lclangFrontendTool
-lclangFrontend -lclangDriver -lclangSerialization -lclangCodeGen
-lclangParse -lclangSema -lclangStaticAnalyzerFrontend
-lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangAnalysis
-lclangARCMigrate -lclangRewriteFrontend -lclangRewriteCore -lclangEdit
-lclangAST -lclangLex -lclangBasic `llvm-config --libs`
Now it compiles :)
Such a silly mistake, but I appreciate your response, it made me see my
mistake.
Thanks!
_______________________________________________
cfe-users mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users