请帮忙编译 brogue-1.7

请帮忙编译 brogue-1.7

我从以下网站下载了源代码https://sites.google.com/site/broguegame/brogue-1.7.4-linux-amd64.tbz2?attredirects=0&d=1

解压它们tar -xf ./brog*

然后尝试制作并收到有关缺少 libsdl1.2 的错误,因此我使用sudo apt-get install libsdl1.2-dev

然后我收到有关缺少ncurses.h和安装一些软件包的错误:sudo apt-get install ncurses-term ncurses-base ncurses-bin libncurses5-dev

make 生成带有警告和错误的长输出:

~/brogue/brogue-1.7.4$ make
./brogue: line 4: ./brogue: No such file or directory
cc -O2 -march=i586 -o bin/brogue src/brogue/Architect.o src/brogue/Combat.o src/brogue/Dijkstra.o src/brogue/Globals.o src/brogue/IO.o src/brogue/Items.o src/brogue/Light.o src/brogue/Monsters.o src/brogue/Buttons.o src/brogue/Movement.o src/brogue/Recordings.o src/brogue/RogueMain.o src/brogue/Random.o src/brogue/MainMenu.o src/brogue/Grid.o src/brogue/Time.o src/platform/main.o src/platform/platformdependent.o src/platform/curses-platform.o src/platform/tcod-platform.o src/platform/term.o -L. -Lsrc/libtcod-1.5.2 `sdl-config --cflags` `sdl-config --libs` -ltcod -Wl,-rpath,. -lncurses -lm -Wl,-rpath,.
/usr/bin/ld: cannot find -ltcod
collect2: error: ld returned 1 exit status

再次make clean出现make both错误:

cc -O2 -march=i586 -o bin/brogue src/brogue/Architect.o src/brogue/Combat.o src/brogue/Dijkstra.o src/brogue/Globals.o src/brogue/IO.o src/brogue/Items.o src/brogue/Light.o src/brogue/Monsters.o src/brogue/Buttons.o src/brogue/Movement.o src/brogue/Recordings.o src/brogue/RogueMain.o src/brogue/Random.o src/brogue/MainMenu.o src/brogue/Grid.o src/brogue/Time.o src/platform/main.o src/platform/platformdependent.o src/platform/curses-platform.o src/platform/tcod-platform.o src/platform/term.o -L. -Lsrc/libtcod-1.5.2 `sdl-config --cflags` `sdl-config --libs` -ltcod -Wl,-rpath,. -lncurses -lm -Wl,-rpath,.
/usr/bin/ld: cannot find -ltcod
collect2: error: ld returned 1 exit status
make: *** [bin/brogue] Error 1

更多消息make curses

~/brogue/brogue-1.7.4$ make curses
./brogue: line 4: ./brogue: No such file or directory
cc -O2 -march=i586 -o bin/brogue src/brogue/Architect.o src/brogue/Combat.o src/brogue/Dijkstra.o src/brogue/Globals.o src/brogue/IO.o src/brogue/Items.o src/brogue/Light.o src/brogue/Monsters.o src/brogue/Buttons.o src/brogue/Movement.o src/brogue/Recordings.o src/brogue/RogueMain.o src/brogue/Random.o src/brogue/MainMenu.o src/brogue/Grid.o src/brogue/Time.o src/platform/main.o src/platform/platformdependent.o src/platform/curses-platform.o src/platform/tcod-platform.o src/platform/term.o -lncurses -lm -Wl,-rpath,.
src/platform/tcod-platform.o: In function `loadFont':
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:36: undefined reference to `SDL_GetVideoInfo'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:56: undefined reference to `TCOD_console_set_custom_font'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:57: undefined reference to `TCOD_console_init_root'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:59: undefined reference to `TCOD_console_map_ascii_codes_to_font'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:60: undefined reference to `TCOD_console_set_keyboard_repeat'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:61: undefined reference to `TCOD_mouse_show_cursor'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:63: undefined reference to `SDL_RWFromFile'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:63: undefined reference to `SDL_LoadBMP_RW'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:63: undefined reference to `SDL_WM_SetIcon'
src/platform/tcod-platform.o: In function `gameLoop':
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:68: undefined reference to `SDL_Init'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:76: undefined reference to `TCOD_console_delete'
src/platform/tcod-platform.o: In function `tcod_plotChar':
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:129: undefined reference to `TCOD_console_put_char_ex'
src/platform/tcod-platform.o: In function `processSpecialKeystrokes':
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:141: undefined reference to `TCOD_sys_save_screenshot'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:147: undefined reference to `TCOD_sys_get_char_size'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:155: undefined reference to `TCOD_console_set_fullscreen'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:162: undefined reference to `TCOD_console_set_fullscreen'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:167: undefined reference to `TCOD_console_delete'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:171: undefined reference to `TCOD_console_flush'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:178: undefined reference to `TCOD_console_set_fullscreen'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:183: undefined reference to `TCOD_console_delete'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:186: undefined reference to `TCOD_console_flush'
src/platform/tcod-platform.o: In function `rewriteKey':
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:202: undefined reference to `SDL_GetModState'
src/platform/tcod-platform.o: In function `getModifiers':
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:226: undefined reference to `SDL_GetKeyState'
src/platform/tcod-platform.o: In function `tcod_pauseForMilliseconds':
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:327: undefined reference to `TCOD_console_flush'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:328: undefined reference to `TCOD_sys_sleep_milli'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:332: undefined reference to `TCOD_sys_check_for_event'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:334: undefined reference to `TCOD_sys_check_for_event'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:343: undefined reference to `TCOD_mouse_get_status'
src/platform/tcod-platform.o: In function `tcod_nextKeyOrMouseEvent':
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:366: undefined reference to `TCOD_console_flush'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:373: undefined reference to `TCOD_sys_elapsed_milli'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:375: undefined reference to `TCOD_console_is_window_closed'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:400: undefined reference to `TCOD_console_is_key_pressed'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:403: undefined reference to `TCOD_console_is_key_pressed'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:416: undefined reference to `TCOD_console_is_key_pressed'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:419: undefined reference to `TCOD_console_is_key_pressed'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:427: undefined reference to `SDL_GetAppState'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:428: undefined reference to `TCOD_sys_sleep_milli'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:434: undefined reference to `TCOD_console_flush'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:438: undefined reference to `TCOD_sys_check_for_event'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:448: undefined reference to `TCOD_mouse_get_status'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:450: undefined reference to `SDL_GetAppState'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:510: undefined reference to `TCOD_sys_elapsed_milli'
/home/billy/brogue/brogue-1.7.4/src/platform/tcod-platform.c:513: undefined reference to `TCOD_sys_sleep_milli'
collect2: error: ld returned 1 exit status
make: *** [bin/brogue] Error 1

答案1

刚刚碰到这个 - 显然 Brogue 是使用libtcod 又名“多里恩图书馆”,一个专门用于 rougelike 主机游戏的应用程序框架(反过来又基于星光大道)。libtcod在 Ubuntu 存储库中不可用,因此您必须从源代码构建它或下载其中一个二进制文件。官方网站位于https://bitbucket.org/libtcod/libtcod它提供了 Mercurial 仓库,或者,如果你更喜欢 Git,可以访问https://github.com/libtcod/libtcod

libtcod 是面向 roguelike 开发者的免费、快速、可移植且简单的 API,提供先进的真彩色控制台、输入以及 roguelikes 中经常使用的许多其他实用程序。

相关内容