符号查找错误(linux - c++)
我正在开发多代理系统,例如 Gnu-linux 上的 Robocup FootballrSim2d
。 我的 distb 是 Ubuntu 11.10(kernel 3.2 - gcc 4.6 )
我安装了 librcsc 来自源代码。 (它编译并安装成功)
然后我安装了 agent2d< /a> 来自 src 。 (它也编译并安装成功!)
但是运行agent2d代码时出现问题:(当我运行src/start.sh
时:)
发生此错误:
./src/sample_player:符号查找错误: /usr/local/lib/librcsc_agent.so.7:未定义的符号: _ZN4rcsc9UDPSocketC1EPKci
你们对此有何看法?实际上,“符号查找错误”什么时候发生?
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 )
I installed librcsc from source . (it compiled and installed successfully)
then I installed agent2d from src . (it compiled and installed successfully too !)
But there is a problem with running the agent2d code : (when I run src/start.sh
: )
this Error happens :
./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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过
c++filt
运行该符号显示它是rcsc::UDPSocket::UDPSocket(char const*, int)
。由于这确实是 rcsc 的一部分,因此您需要查看 ldd /usr/local/lib/librcsc_agent.so.7 。
librcsc.so.X
(对于某些数字X
)的条目可能会显示“未找到”。您必须找到适当的库(包括ldd
表示正在搜索的数字后缀)并将包含它的目录添加到start 中的
脚本。LD_LIBRARY_PATH
环境变量中.shRunning that symbol through
c++filt
shows that it isrcsc::UDPSocket::UDPSocket(char const*, int)
.Since that is, indeed, part of
rcsc
, you need to take a look atldd /usr/local/lib/librcsc_agent.so.7
. The entry forlibrcsc.so.X
(for some numberX
) there probably says "not found". You must locate the appropriate library (including the numeric suffix thatldd
said was being searched for) and add the directory containing it to theLD_LIBRARY_PATH
environment variable in thestart.sh
script.