[LLVMdev] linking share libraries when building whole-program bitcode file

Timo Juhani Lindfors timo.lindfors at iki.fi
Tue Nov 17 10:25:55 PST 2009


Nan Zhu <zhunansjtu at gmail.com> writes:
> llvm-gcc -c -emit-llvm test.c
>
> llvm-ld test.o -lpthread //here llvm-ld tells me that "Cannot find library
> pthread"

$ llvm-gcc -c -emit-llvm test.c
$ llvm-ld test.o -lpthread
$ ./a.out
Error opening '/usr/lib/libpthread.a': /usr/lib/libpthread.a: invalid ELF header
  -load request ignored.
Hello world




More information about the llvm-dev mailing list