[LLVMdev] fail to compile my code on 3.2

Jun Koi junkoi2004 at gmail.com
Sat Jan 5 17:21:33 PST 2013


On Sat, Jan 5, 2013 at 9:22 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:

> On Sat, Jan 5, 2013 at 9:18 AM, Jun Koi <junkoi2004 at gmail.com> wrote:
> > hi,
> >
> > my old code compiles well on 3.1, but fails on 3.2.
> > the compile error is like below.
> >
> >
> > ...
> > g++ -o vc main.o `llvm-config --libs all --ldflags`
> > /usr/lib/libLLVMSupport.a(Signals.o): In function
> `PrintStackTrace(void*)':
> > Signals.cpp:(.text+0x6c8): undefined reference to `dladdr'
> > Signals.cpp:(.text+0x749): undefined reference to `dladdr'
> > collect2: error: ld returned 1 exit status
> > make: *** [vc] Error 1
> >
> >
> > this is on Ubuntu 12.4, 64-bit. any idea on how to fix this?
>
> Adding -ldl explicitly might help.
>
>
yes, that solves the problem, thanks!

Jun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130106/9e3430a7/attachment.html>


More information about the llvm-dev mailing list