[cfe-users] linker errors against clang/llvm libraries

Dmitri Gribenko gribozavr at gmail.com
Tue Feb 11 01:28:02 PST 2014


On Tue, Feb 11, 2014 at 4:15 AM, Adrian Ortega <elfus0.1 at gmail.com> 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

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-users mailing list