Symbol lookup error (linux - c++)

て烟熏妆下的殇ゞ 提交于 2019-12-12 15:15:58

问题


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?


回答1:


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

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.



来源:https://stackoverflow.com/questions/9154072/symbol-lookup-error-linux-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!