查找 libstdc 中缺失的符号++在 Debian/squeeze 上
我正在尝试使用作为 .so 文件提供的预编译库。
该文件动态链接到一些库:
$ ldd /usr/local/test/lib/libtest.so
linux-gate.so.1 => (0xb770d000)
libstdc++-libc6.1-1.so.2 => not found
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb75e1000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7499000)
/lib/ld-linux.so.2 (0xb770e000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb747c000)
不幸的是,在 Debian/squeeze 中,没有 libstdc++-libc6.1-1.so.* 文件。 只有 libstdc++6 软件包提供的 libstdc++.so.* 文件。
我尝试将 libstdc++-libc6.1-1.so.2 链接(使用 ln -s)到 libstdc++.so.6 文件。它不起作用,当我尝试使用此库查找我的 .o 文件时,似乎缺少一批符号。
/usr/local/test/lib/libtest.so: undefined reference to `__builtin_vec_delete'
/usr/local/test/lib/libtest.so: undefined reference to `istrstream::istrstream(int, char const *, int)'
/usr/local/test/lib/libtest.so: undefined reference to `__rtti_user'
/usr/local/test/lib/libtest.so: undefined reference to `__builtin_new'
/usr/local/test/lib/libtest.so: undefined reference to `istream::ignore(int, int)'
你会怎么办 ?我如何找到这些符号导出到哪个库?
I'm trying to use a pre-compiled library provided as a .so file.
This file is dynamically linked against a few librairies :
$ ldd /usr/local/test/lib/libtest.so
linux-gate.so.1 => (0xb770d000)
libstdc++-libc6.1-1.so.2 => not found
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb75e1000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7499000)
/lib/ld-linux.so.2 (0xb770e000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb747c000)
Unfortunately, in Debian/squeeze, there is no libstdc++-libc6.1-1.so.* file.
Only a libstdc++.so.* file provided by the libstdc++6 package.
I tried to link (using ln -s) libstdc++-libc6.1-1.so.2 to the libstdc++.so.6 file. It does not work, a batch of symbols seems to be lacking when I'm trying to ld my .o files with this lib.
/usr/local/test/lib/libtest.so: undefined reference to `__builtin_vec_delete'
/usr/local/test/lib/libtest.so: undefined reference to `istrstream::istrstream(int, char const *, int)'
/usr/local/test/lib/libtest.so: undefined reference to `__rtti_user'
/usr/local/test/lib/libtest.so: undefined reference to `__builtin_new'
/usr/local/test/lib/libtest.so: undefined reference to `istream::ignore(int, int)'
What would you do ? How may I find in which lib those symbols are exported ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
谷歌说你需要 libstdc++2.9-glibc2.1
http ://linux.derkeiler.com/Mailing-Lists/Debian/2005-07/0755.html
虽然它来自过时的 debian 版本,但我不确定安装它是否是一个好主意。
编辑
其实我是出于好奇才尝试的。它没有造成任何损害,并且似乎与标准 libstc++ 共存良好。so
wget http://archive.debian.org/debian/pool/main/e/egcs1.1/libstdc++2.9-glibc2.1_2.91.66-4_i386.deb
dpkg -i libstdc++2.9-glibc2.1_2.91.66-4_i386.deb
Google says that you need libstdc++2.9-glibc2.1
http://linux.derkeiler.com/Mailing-Lists/Debian/2005-07/0755.html
Although it's from obsolete debian release and I'm not sure if it's such a good idea to install it.
Edit
Actually I tried it out of curiosity. It didn't do any harm and seem to coexist well with standard libstc++.so
wget http://archive.debian.org/debian/pool/main/e/egcs1.1/libstdc++2.9-glibc2.1_2.91.66-4_i386.deb
dpkg -i libstdc++2.9-glibc2.1_2.91.66-4_i386.deb
尝试以下方法:
然后寻找
istrstream
。这可能会相当慢。Try something along the lines of:
Then hunt for
istrstream
. This could be rather slow.