Solved Linker: Cannot find -lliblldb
-
I have been trying for hours to link with liblldb.so and I can't figure it out. I have the following libraries installed on my machine:
/usr/lib/python2.7/dist-packages/lldb-3.8/_lldb.so
/usr/lib/llvm-3.8/lib/python2.7/site-packages/lldb/_lldb.so
/usr/lib/llvm-3.8/lib/liblldb.soI believe I need to link with the last one. At the bottom of my .pro I have the following:
LIBS += -L"/usr/lib/llvm-3.8/lib/" -lliblldb
I have tried every permutation of "-lliblldb", "-liblldb", "-llldb" and "-lldb" that I can think of. Any advice would be appreciated. Thanks in advance.
-
@psoberoi said in Linker: Cannot find -lliblldb:
LIBS += -L"/usr/lib/llvm-3.8/lib/" -lliblldb
lib prefix is not required. Just add the following line. It should work. Assuming your library name is liblldb, you should just link with lldb. See following line.
LIBS += -L"/usr/lib/llvm-3.8/lib/" -llldb
-
Thank you for the fast response. I got the same error ": :-1: error: cannot find -llldb"
-
This error indicates that library is not present in the directory -L"/usr/lib/llvm-3.8/lib/". Can you show the contents of the directory ? Also is the library 32 bit or 64 bit ?
-
Thank you, you have gotten me to the source of the problem. It turns out LLDB 3.8 has broken symlinks in the lib folder. I'm looking into how to fix.
You can mark this question as closed. Thanks again.
-
Hi,
The most simple is to call
ln -s liblldb.so.x.y.z liblldb.so.x.y ln -s liblldb.so.x.y.z liblldb.so.x ln -s liblldb.so.x.y.z liblldb.so
Replace x, y and z by the appropriate numbers of your library.