[lldb-dev] Cannot link against liblldb
Ziming Song
s.ziming at hotmail.com
Sun Mar 22 09:33:46 PDT 2015
Thanks, that solved my problem. (I'm using Ubuntu 14.04.1)> Date: Sun, 22 Mar 2015 18:55:42 +0300
> From: a3at.mail at gmail.com
> To: s.ziming at hotmail.com
> CC: lldb-dev at cs.uiuc.edu
> Subject: Re: [lldb-dev] Cannot link against liblldb
>
> On Sun, Mar 22, 2015 at 03:10:25PM +0000, Ziming Song wrote:
> > I'm having problem creating my program using lldb API.
> > I can compile lldb successfully, and I can compile and link my program with:
> > clang++ -std=c++11 dbg.cpp -o dbg -I ../llvm/tools/lldb/include/ -L ../llvm-build/lib/ -llldb
> > But when I run the program it says
> > ./dbg: error while loading shared libraries: liblldb.so.3.7: cannot open shared object file: No such file or directory
> > I tried copy liblldb* to current directory and copy executable to llvm-build/lib directory, but no luck.
>
> What os do you have?
>
> dynamic linker doesn't search libraries in current directory by default,
> it use LD_LIBRARY_PATH (linux) and DYLD_LIBRARY_PATH (osx) and also it
> use DT_R{UN,}PATH but this is another story I guess.
>
> So if you compile using -L ../llvm-build/lib, than you need do next:
> $ export LD_LIBRARY_PATH=$PWD/../llvm-build/lib # for linux
> $ ./dbg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150322/c2be4899/attachment.html>
More information about the lldb-dev
mailing list