0

我有几个从 RHEL6.2 系统 64 位机器编译的 GUI 库。我的任务是在 Ubuntu 64 位机器上运行它.. 所以我在 Ubuntu 12.04.1 和 Ubuntu 11.04 中都尝试过它,我都面临着类似的问题..

分段错误(核心转储) *分段错误

回溯:/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSsC1ERKSs+0xb)[0x7f14e2728f2b]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5070f2b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (gdb) bt
#0  0x00007ffff5070f2b in std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::basic_string(std::string const&) ()    from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

我无法将它编译到我的电脑上,因为我没有源代码。只有他们给我的图书馆..谁能帮我解决这个问题..

G++ 版本 g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

请帮助我..提前谢谢//


谢谢回复 ..

是的,我交叉检查了两个 gcc 版本

这是我的主机电脑,我可以在其中运行我的应用程序

 gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
    Copyright (C) 2011 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



     ls -ld /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    lrwxrwxrwx 1 root root 19 Apr 16  2012 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -> libstdc++.so.6.0.16

和我试图运行但不工作的电脑是

gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


ls -ld  /usr/lib/x86_64-linux-gnu/libstdc++.so.6
lrwxrwxrwx 1 root root 19 Apr 16  2012 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -> libstdc++.so.6.0.16

两者都是精确的 Ubuntu 12.04

我无法确定我的错在哪里。.

请帮忙 ..

4

1 回答 1

1

Ubuntu 12.04 和 11.04 都使用比 RHEL6.2 更新得多的库。检查标准库的版本。我敢打赌他们是不同的。

一般来说,您不能只拿起一个二进制文件(程序或库)并在另一个上运行它。如果你有一个 .rpm 或 .deb 包,你会看到应该有版本依赖关系。

您还可以使用 ldd 查看您的库所依赖的其他库。

于 2013-02-25T13:06:04.203 回答