符号查找错误(Linux-C ++) [英] Symbol lookup error (linux - c++)

查看:126
本文介绍了符号查找错误(Linux-C ++)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Gnu-linux上的多代理系统(如Robocup soccerrSim2d)上工作. 我的distb是Ubuntu 11.10(内核3.2-gcc 4.6)

i'm working on multi-agent system like Robocup soccerrSim2d On Gnu-linux . My distb is Ubuntu 11.10(kernel 3.2 - gcc 4.6 )

我从源代码安装了 librcsc . (它已成功编译并安装)

I installed librcsc from source . (it compiled and installed successfully)

然后我从以下位置安装了 agent2d src. (它也成功编译并安装!)

then I installed agent2d from src . (it compiled and installed successfully too !)

但是运行agent2d代码存在问题:(当我运行src/start.sh时:)

But there is a problem with running the agent2d code : (when I run src/start.sh : )

发生此错误:

./src/sample_player:符号查找错误: /usr/local/lib/librcsc_agent.so.7:未定义符号: _ZN4rcsc9UDPSocketC1EPKci

./src/sample_player: symbol lookup error: /usr/local/lib/librcsc_agent.so.7: undefined symbol: _ZN4rcsc9UDPSocketC1EPKci

您如何看待这些家伙?实际上,什么时候出现符号查找错误"?

What do you think about it guys? Actually, when does "Symbol lookup Error " happen?

推荐答案

通过c++filt运行该符号表示该符号为rcsc::UDPSocket::UDPSocket(char const*, int).

Running that symbol through c++filt shows that it is rcsc::UDPSocket::UDPSocket(char const*, int).

因为它确实是rcsc的一部分,所以您需要看一下ldd /usr/local/lib/librcsc_agent.so.7. librcsc.so.X(对于某些数字X)的条目可能显示为未找到".您必须找到适当的库(包括正在搜索表示ldd的数字后缀),并将包含该库的目录添加到start.sh脚本中的LD_LIBRARY_PATH环境变量中.

Since that is, indeed, part of rcsc, you need to take a look at ldd /usr/local/lib/librcsc_agent.so.7. The entry for librcsc.so.X (for some number X) there probably says "not found". You must locate the appropriate library (including the numeric suffix that ldd said was being searched for) and add the directory containing it to the LD_LIBRARY_PATH environment variable in the start.sh script.

这篇关于符号查找错误(Linux-C ++)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆