umenu.cpp未定义的引用错误

时间:2014-07-24 23:53:52

标签: c++

我正在尝试编译机器人,而且我已经有几天遇到麻烦了。经过几个小时的调试后,我只留下了这个错误:

libui.a(libui_a-uMenu.o): In function `uMenuItemString::Event(SDL_Event&) [clone .part.51]':
uMenu.cpp:(.text+0x447c): undefined reference to `get_scrap(int, int*, char**)'
uMenu.cpp:(.text+0x47ac): undefined reference to `init_scrap()'
collect2: error: ld returned 1 exit status
make[3]: *** [armagetronad_main] Error 1
make[3]: Leaving directory `/home/noah/0.4-bot/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/noah/0.4-bot/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/noah/0.4-bot'
make: *** [all] Error 2

1 个答案:

答案 0 :(得分:0)

您的链接中缺少get_scrap()init_scrap()个功能。它们可能位于其他源代码或库中。