我正在尝试编译机器人,而且我已经有几天遇到麻烦了。经过几个小时的调试后,我只留下了这个错误:
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
答案 0 :(得分:0)
您的链接中缺少get_scrap()
和init_scrap()
个功能。它们可能位于其他源代码或库中。