开发者

ld cannot find library that is installed

I'm sitting on an OpenSuse 11.1 x64 Box and I have a module that uses sigc++. When linking like this:

g++ [a lot of o's, L's and l's] -lsigc-2.0

I get

/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lsigc-2.0

However the library is there.

In the filesystem:

$ sudo find / -name "libsigc-2.0*"
/usr/lib64/libsigc-2.0.so.0.0.0
/usr/lib64/libsigc-2.0.so.0
/usr/lib64/libsigc-2.0.so

In ld.so.conf I have:

/usr/lib64

And when invoking ldconfig:

$ ld开发者_Go百科config -v | grep sigc
libsigc-2.0.so.0 -> libsigc-2.0.so.0.0.0

Why?


I'm so dumb. It's an old codebase and just before the -lsigc-2.0 statement I had a

-Wl,-Bstatic

Obviously, there are no static librarys for libsigc (anymore).


It is possible that libsigc-2.0.so was linked with an SONAME other than libsigc-2.0.

objdump -p /usr/lib64/libsigc-2.0.so | grep SONAME

If you see something unexpected, e.g. libsigc, you may need to create an additional symlink with that name.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜