前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >蓝桥ROS机器人之绚丽贪吃蛇

蓝桥ROS机器人之绚丽贪吃蛇

作者头像
zhangrelay
发布2022-05-01 10:23:17
4230
发布2022-05-01 10:23:17
举报

前面一个贪吃蛇🐍,效果很普通:

有了GitHub,结合蓝桥云课,几乎无敌!

参考:github.com/rapiz1/DungeonRush

下载代码:

代码语言:javascript
复制
git clone https://github.com/rapiz1/DungeonRush.git
代码语言:javascript
复制
# apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev

编译可能报错:

cmake ..

make

修改CMakeList.txt

project(DungeonRush)


编译后文件内容如下:

代码语言:javascript
复制
shiyanlou:DungeonRush/ (master*) $ tree                              [20:53:10]
.
\u251c\u2500\u2500 build
\u2502   \u251c\u2500\u2500 bin
\u2502   \u2502   \u251c\u2500\u2500 dungeon_rush
\u2502   \u2502   \u2514\u2500\u2500 res
\u2502   \u2502       \u251c\u2500\u2500 audio
\u2502   \u2502       \u2502   \u251c\u2500\u2500 arrow_hit.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 bg1.ogg
\u2502   \u2502       \u2502   \u251c\u2500\u2500 bg2.ogg
\u2502   \u2502       \u2502   \u251c\u2500\u2500 bg3.ogg
\u2502   \u2502       \u2502   \u251c\u2500\u2500 button1.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 claw_hit_heavy.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 claw_hit.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 coin.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 fireball_explosion.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 hit_0.5v.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 human_death.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 ice_shoot_0.5v.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 ice_shoot.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 interaction1_0.75v.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 light_shoot.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 lose_2v.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 main_title.ogg
\u2502   \u2502       \u2502   \u251c\u2500\u2500 med.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 powerloss.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 shoot.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 sounds
\u2502   \u2502       \u2502   \u251c\u2500\u2500 sword_hit.wav
\u2502   \u2502       \u2502   \u251c\u2500\u2500 thunder_2v.wav
\u2502   \u2502       \u2502   \u2514\u2500\u2500 win.wav
\u2502   \u2502       \u251c\u2500\u2500 drawable
\u2502   \u2502       \u2502   \u251c\u2500\u2500 0x72_DungeonTilesetII_v1_3
\u2502   \u2502       \u2502   \u251c\u2500\u2500 0x72_DungeonTilesetII_v1_3.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 arrow
\u2502   \u2502       \u2502   \u251c\u2500\u2500 arrow.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 attack_up
\u2502   \u2502       \u2502   \u251c\u2500\u2500 attack_up.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 Axe
\u2502   \u2502       \u2502   \u251c\u2500\u2500 Axe.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 blood
\u2502   \u2502       \u2502   \u251c\u2500\u2500 BloodBound
\u2502   \u2502       \u2502   \u251c\u2500\u2500 BloodBound.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 blood.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 ClawFx
\u2502   \u2502       \u2502   \u251c\u2500\u2500 ClawFx2
\u2502   \u2502       \u2502   \u251c\u2500\u2500 ClawFx2.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 ClawFx.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 cross_hit
\u2502   \u2502       \u2502   \u251c\u2500\u2500 cross_hit.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 explosion-2
\u2502   \u2502       \u2502   \u251c\u2500\u2500 explosion-2.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 fireball
\u2502   \u2502       \u2502   \u251c\u2500\u2500 fireball_explosion1
\u2502   \u2502       \u2502   \u251c\u2500\u2500 fireball_explosion1.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 fireball.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 floor_exit
\u2502   \u2502       \u2502   \u251c\u2500\u2500 floor_exit.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 floor_spike
\u2502   \u2502       \u2502   \u251c\u2500\u2500 floor_spike.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 golden_cross_hit
\u2502   \u2502       \u2502   \u251c\u2500\u2500 golden_cross_hit.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 halo_explosion1
\u2502   \u2502       \u2502   \u251c\u2500\u2500 halo_explosion1.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 halo_explosion2
\u2502   \u2502       \u2502   \u251c\u2500\u2500 halo_explosion2.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 HolyShield
\u2502   \u2502       \u2502   \u251c\u2500\u2500 HolyShield.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 HpMed
\u2502   \u2502       \u2502   \u251c\u2500\u2500 HpMed.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 Ice
\u2502   \u2502       \u2502   \u251c\u2500\u2500 IcePick
\u2502   \u2502       \u2502   \u251c\u2500\u2500 IcePick.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 Ice.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 IceShatter
\u2502   \u2502       \u2502   \u251c\u2500\u2500 IceShatter.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 powerful_bow
\u2502   \u2502       \u2502   \u251c\u2500\u2500 powerful_bow.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 purple_ball
\u2502   \u2502       \u2502   \u251c\u2500\u2500 purple_ball.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 purple_exp
\u2502   \u2502       \u2502   \u251c\u2500\u2500 purple_exp.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 Shine
\u2502   \u2502       \u2502   \u251c\u2500\u2500 Shine.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 SolidFx
\u2502   \u2502       \u2502   \u251c\u2500\u2500 SolidFx.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 SolidFx.png.bk
\u2502   \u2502       \u2502   \u251c\u2500\u2500 staff
\u2502   \u2502       \u2502   \u251c\u2500\u2500 staff.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 SwordFx
\u2502   \u2502       \u2502   \u251c\u2500\u2500 SwordFx.bk
\u2502   \u2502       \u2502   \u251c\u2500\u2500 SwordFx.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 SwordFx.png.bk
\u2502   \u2502       \u2502   \u251c\u2500\u2500 SwordPack
\u2502   \u2502       \u2502   \u251c\u2500\u2500 SwordPack.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 Thunder
\u2502   \u2502       \u2502   \u251c\u2500\u2500 Thunder.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 Thunder_Yellow
\u2502   \u2502       \u2502   \u251c\u2500\u2500 Thunder_Yellow.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 title
\u2502   \u2502       \u2502   \u251c\u2500\u2500 title.png
\u2502   \u2502       \u2502   \u251c\u2500\u2500 ui
\u2502   \u2502       \u2502   \u2514\u2500\u2500 ui.png
\u2502   \u2502       \u251c\u2500\u2500 font
\u2502   \u2502       \u2502   \u2514\u2500\u2500 m5x7.ttf
\u2502   \u2502       \u2514\u2500\u2500 text.txt
\u2502   \u251c\u2500\u2500 CMakeCache.txt
\u2502   \u251c\u2500\u2500 CMakeFiles
\u2502   \u2502   \u251c\u2500\u2500 3.5.1
\u2502   \u2502   \u2502   \u251c\u2500\u2500 CMakeCCompiler.cmake
\u2502   \u2502   \u2502   \u251c\u2500\u2500 CMakeCXXCompiler.cmake
\u2502   \u2502   \u2502   \u251c\u2500\u2500 CMakeDetermineCompilerABI_C.bin
\u2502   \u2502   \u2502   \u251c\u2500\u2500 CMakeDetermineCompilerABI_CXX.bin
\u2502   \u2502   \u2502   \u251c\u2500\u2500 CMakeSystem.cmake
\u2502   \u2502   \u2502   \u251c\u2500\u2500 CompilerIdC
\u2502   \u2502   \u2502   \u2502   \u251c\u2500\u2500 a.out
\u2502   \u2502   \u2502   \u2502   \u2514\u2500\u2500 CMakeCCompilerId.c
\u2502   \u2502   \u2502   \u2514\u2500\u2500 CompilerIdCXX
\u2502   \u2502   \u2502       \u251c\u2500\u2500 a.out
\u2502   \u2502   \u2502       \u2514\u2500\u2500 CMakeCXXCompilerId.cpp
\u2502   \u2502   \u251c\u2500\u2500 cmake.check_cache
\u2502   \u2502   \u251c\u2500\u2500 CMakeDirectoryInformation.cmake
\u2502   \u2502   \u251c\u2500\u2500 CMakeError.log
\u2502   \u2502   \u251c\u2500\u2500 CMakeOutput.log
\u2502   \u2502   \u251c\u2500\u2500 CMakeTmp
\u2502   \u2502   \u251c\u2500\u2500 dungeon_rush.dir
\u2502   \u2502   \u2502   \u251c\u2500\u2500 build.make
\u2502   \u2502   \u2502   \u251c\u2500\u2500 C.includecache
\u2502   \u2502   \u2502   \u251c\u2500\u2500 cmake_clean.cmake
\u2502   \u2502   \u2502   \u251c\u2500\u2500 DependInfo.cmake
\u2502   \u2502   \u2502   \u251c\u2500\u2500 depend.internal
\u2502   \u2502   \u2502   \u251c\u2500\u2500 depend.make
\u2502   \u2502   \u2502   \u251c\u2500\u2500 flags.make
\u2502   \u2502   \u2502   \u251c\u2500\u2500 link.txt
\u2502   \u2502   \u2502   \u251c\u2500\u2500 progress.make
\u2502   \u2502   \u2502   \u2514\u2500\u2500 src
\u2502   \u2502   \u2502       \u251c\u2500\u2500 ai.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 audio.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 bullet.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 game.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 helper.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 main.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 map.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 net.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 player.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 prng.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 render.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 res.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 sprite.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 storage.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 types.c.o
\u2502   \u2502   \u2502       \u251c\u2500\u2500 ui.c.o
\u2502   \u2502   \u2502       \u2514\u2500\u2500 weapon.c.o
\u2502   \u2502   \u251c\u2500\u2500 feature_tests.bin
\u2502   \u2502   \u251c\u2500\u2500 feature_tests.c
\u2502   \u2502   \u251c\u2500\u2500 feature_tests.cxx
\u2502   \u2502   \u251c\u2500\u2500 Makefile2
\u2502   \u2502   \u251c\u2500\u2500 Makefile.cmake
\u2502   \u2502   \u251c\u2500\u2500 progress.marks
\u2502   \u2502   \u2514\u2500\u2500 TargetDirectories.txt
\u2502   \u251c\u2500\u2500 cmake_install.cmake
\u2502   \u2514\u2500\u2500 Makefile
\u251c\u2500\u2500 cmake
\u2502   \u2514\u2500\u2500 sdl2
\u2502       \u251c\u2500\u2500 Copyright.txt
\u2502       \u251c\u2500\u2500 FindSDL2.cmake
\u2502       \u251c\u2500\u2500 FindSDL2_gfx.cmake
\u2502       \u251c\u2500\u2500 FindSDL2_image.cmake
\u2502       \u251c\u2500\u2500 FindSDL2_mixer.cmake
\u2502       \u251c\u2500\u2500 FindSDL2_net.cmake
\u2502       \u251c\u2500\u2500 FindSDL2_ttf.cmake
\u2502       \u2514\u2500\u2500 README.md
\u251c\u2500\u2500 CMakeLists.txt
\u251c\u2500\u2500 dungeonrush.desktop
\u251c\u2500\u2500 dungeonrush.png
\u251c\u2500\u2500 LICENSE
\u251c\u2500\u2500 README.md
\u251c\u2500\u2500 res
\u2502   \u251c\u2500\u2500 audio
\u2502   \u2502   \u251c\u2500\u2500 arrow_hit.wav
\u2502   \u2502   \u251c\u2500\u2500 bg1.ogg
\u2502   \u2502   \u251c\u2500\u2500 bg2.ogg
\u2502   \u2502   \u251c\u2500\u2500 bg3.ogg
\u2502   \u2502   \u251c\u2500\u2500 button1.wav
\u2502   \u2502   \u251c\u2500\u2500 claw_hit_heavy.wav
\u2502   \u2502   \u251c\u2500\u2500 claw_hit.wav
\u2502   \u2502   \u251c\u2500\u2500 coin.wav
\u2502   \u2502   \u251c\u2500\u2500 fireball_explosion.wav
\u2502   \u2502   \u251c\u2500\u2500 hit_0.5v.wav
\u2502   \u2502   \u251c\u2500\u2500 human_death.wav
\u2502   \u2502   \u251c\u2500\u2500 ice_shoot_0.5v.wav
\u2502   \u2502   \u251c\u2500\u2500 ice_shoot.wav
\u2502   \u2502   \u251c\u2500\u2500 interaction1_0.75v.wav
\u2502   \u2502   \u251c\u2500\u2500 light_shoot.wav
\u2502   \u2502   \u251c\u2500\u2500 lose_2v.wav
\u2502   \u2502   \u251c\u2500\u2500 main_title.ogg
\u2502   \u2502   \u251c\u2500\u2500 med.wav
\u2502   \u2502   \u251c\u2500\u2500 powerloss.wav
\u2502   \u2502   \u251c\u2500\u2500 shoot.wav
\u2502   \u2502   \u251c\u2500\u2500 sounds
\u2502   \u2502   \u251c\u2500\u2500 sword_hit.wav
\u2502   \u2502   \u251c\u2500\u2500 thunder_2v.wav
\u2502   \u2502   \u2514\u2500\u2500 win.wav
\u2502   \u251c\u2500\u2500 drawable
\u2502   \u2502   \u251c\u2500\u2500 0x72_DungeonTilesetII_v1_3
\u2502   \u2502   \u251c\u2500\u2500 0x72_DungeonTilesetII_v1_3.png
\u2502   \u2502   \u251c\u2500\u2500 arrow
\u2502   \u2502   \u251c\u2500\u2500 arrow.png
\u2502   \u2502   \u251c\u2500\u2500 attack_up
\u2502   \u2502   \u251c\u2500\u2500 attack_up.png
\u2502   \u2502   \u251c\u2500\u2500 Axe
\u2502   \u2502   \u251c\u2500\u2500 Axe.png
\u2502   \u2502   \u251c\u2500\u2500 blood
\u2502   \u2502   \u251c\u2500\u2500 BloodBound
\u2502   \u2502   \u251c\u2500\u2500 BloodBound.png
\u2502   \u2502   \u251c\u2500\u2500 blood.png
\u2502   \u2502   \u251c\u2500\u2500 ClawFx
\u2502   \u2502   \u251c\u2500\u2500 ClawFx2
\u2502   \u2502   \u251c\u2500\u2500 ClawFx2.png
\u2502   \u2502   \u251c\u2500\u2500 ClawFx.png
\u2502   \u2502   \u251c\u2500\u2500 cross_hit
\u2502   \u2502   \u251c\u2500\u2500 cross_hit.png
\u2502   \u2502   \u251c\u2500\u2500 explosion-2
\u2502   \u2502   \u251c\u2500\u2500 explosion-2.png
\u2502   \u2502   \u251c\u2500\u2500 fireball
\u2502   \u2502   \u251c\u2500\u2500 fireball_explosion1
\u2502   \u2502   \u251c\u2500\u2500 fireball_explosion1.png
\u2502   \u2502   \u251c\u2500\u2500 fireball.png
\u2502   \u2502   \u251c\u2500\u2500 floor_exit
\u2502   \u2502   \u251c\u2500\u2500 floor_exit.png
\u2502   \u2502   \u251c\u2500\u2500 floor_spike
\u2502   \u2502   \u251c\u2500\u2500 floor_spike.png
\u2502   \u2502   \u251c\u2500\u2500 golden_cross_hit
\u2502   \u2502   \u251c\u2500\u2500 golden_cross_hit.png
\u2502   \u2502   \u251c\u2500\u2500 halo_explosion1
\u2502   \u2502   \u251c\u2500\u2500 halo_explosion1.png
\u2502   \u2502   \u251c\u2500\u2500 halo_explosion2
\u2502   \u2502   \u251c\u2500\u2500 halo_explosion2.png
\u2502   \u2502   \u251c\u2500\u2500 HolyShield
\u2502   \u2502   \u251c\u2500\u2500 HolyShield.png
\u2502   \u2502   \u251c\u2500\u2500 HpMed
\u2502   \u2502   \u251c\u2500\u2500 HpMed.png
\u2502   \u2502   \u251c\u2500\u2500 Ice
\u2502   \u2502   \u251c\u2500\u2500 IcePick
\u2502   \u2502   \u251c\u2500\u2500 IcePick.png
\u2502   \u2502   \u251c\u2500\u2500 Ice.png
\u2502   \u2502   \u251c\u2500\u2500 IceShatter
\u2502   \u2502   \u251c\u2500\u2500 IceShatter.png
\u2502   \u2502   \u251c\u2500\u2500 powerful_bow
\u2502   \u2502   \u251c\u2500\u2500 powerful_bow.png
\u2502   \u2502   \u251c\u2500\u2500 purple_ball
\u2502   \u2502   \u251c\u2500\u2500 purple_ball.png
\u2502   \u2502   \u251c\u2500\u2500 purple_exp
\u2502   \u2502   \u251c\u2500\u2500 purple_exp.png
\u2502   \u2502   \u251c\u2500\u2500 Shine
\u2502   \u2502   \u251c\u2500\u2500 Shine.png
\u2502   \u2502   \u251c\u2500\u2500 SolidFx
\u2502   \u2502   \u251c\u2500\u2500 SolidFx.png
\u2502   \u2502   \u251c\u2500\u2500 SolidFx.png.bk
\u2502   \u2502   \u251c\u2500\u2500 staff
\u2502   \u2502   \u251c\u2500\u2500 staff.png
\u2502   \u2502   \u251c\u2500\u2500 SwordFx
\u2502   \u2502   \u251c\u2500\u2500 SwordFx.bk
\u2502   \u2502   \u251c\u2500\u2500 SwordFx.png
\u2502   \u2502   \u251c\u2500\u2500 SwordFx.png.bk
\u2502   \u2502   \u251c\u2500\u2500 SwordPack
\u2502   \u2502   \u251c\u2500\u2500 SwordPack.png
\u2502   \u2502   \u251c\u2500\u2500 Thunder
\u2502   \u2502   \u251c\u2500\u2500 Thunder.png
\u2502   \u2502   \u251c\u2500\u2500 Thunder_Yellow
\u2502   \u2502   \u251c\u2500\u2500 Thunder_Yellow.png
\u2502   \u2502   \u251c\u2500\u2500 title
\u2502   \u2502   \u251c\u2500\u2500 title.png
\u2502   \u2502   \u251c\u2500\u2500 ui
\u2502   \u2502   \u2514\u2500\u2500 ui.png
\u2502   \u251c\u2500\u2500 font
\u2502   \u2502   \u2514\u2500\u2500 m5x7.ttf
\u2502   \u2514\u2500\u2500 text.txt
\u251c\u2500\u2500 screenshot.gif
\u2514\u2500\u2500 src
    \u251c\u2500\u2500 adt.h
    \u251c\u2500\u2500 ai.c
    \u251c\u2500\u2500 ai.h
    \u251c\u2500\u2500 audio.c
    \u251c\u2500\u2500 audio.h
    \u251c\u2500\u2500 bullet.c
    \u251c\u2500\u2500 bullet.h
    \u251c\u2500\u2500 game.c
    \u251c\u2500\u2500 game.h
    \u251c\u2500\u2500 helper.c
    \u251c\u2500\u2500 helper.h
    \u251c\u2500\u2500 main.c
    \u251c\u2500\u2500 map.c
    \u251c\u2500\u2500 map.h
    \u251c\u2500\u2500 net.c
    \u251c\u2500\u2500 net.h
    \u251c\u2500\u2500 player.c
    \u251c\u2500\u2500 player.h
    \u251c\u2500\u2500 prng.c
    \u251c\u2500\u2500 prng.h
    \u251c\u2500\u2500 render.c
    \u251c\u2500\u2500 render.h
    \u251c\u2500\u2500 res.c
    \u251c\u2500\u2500 res.h
    \u251c\u2500\u2500 sprite.c
    \u251c\u2500\u2500 sprite.h
    \u251c\u2500\u2500 storage.c
    \u251c\u2500\u2500 storage.h
    \u251c\u2500\u2500 text.h
    \u251c\u2500\u2500 types.c
    \u251c\u2500\u2500 types.h
    \u251c\u2500\u2500 ui.c
    \u251c\u2500\u2500 ui.h
    \u251c\u2500\u2500 weapon.c
    \u2514\u2500\u2500 weapon.h

20 directories, 293 files
shiyanlou:DungeonRush/ (master*) $                                   [20:53:13]
代码语言:javascript
复制
shiyanlou:build/ (master) $ cmake ..                                 [20:39:08]
CMake Error: Could not find cmake module file: CMakeDetermineDESCRIPTIONCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_DESCRIPTION_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_DESCRIPTION_COMPILER
CMake Error: Could not find cmake module file: /home/shiyanlou/Code/DungeonRush/build/CMakeFiles/3.5.1/CMakeDESCRIPTIONCompiler.cmake
CMake Error: Could not find cmake module file: CMakeDetermineA game inspired by snakeCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_A game inspired by snake_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_A game inspired by snake_COMPILER
CMake Error: Could not find cmake module file: /home/shiyanlou/Code/DungeonRush/build/CMakeFiles/3.5.1/CMakeA game inspired by snakeCompiler.cmake
CMake Error at CMakeLists.txt:2 (project):
  No CMAKE_DESCRIPTION_COMPILER could be found.

  Tell CMake where to find the compiler by setting the CMake cache entry
  CMAKE_DESCRIPTION_COMPILER to the full path to the compiler, or to the
  compiler name if it is in the PATH.


CMake Error: Could not find cmake module file: CMakeDESCRIPTIONInformation.cmake
CMake Error at CMakeLists.txt:2 (project):
  No CMAKE_A game inspired by snake_COMPILER could be found.

  Tell CMake where to find the compiler by setting the CMake cache entry
  CMAKE_A game inspired by snake_COMPILER to the full path to the compiler,
  or to the compiler name if it is in the PATH.


CMake Error: Could not find cmake module file: CMakeA game inspired by snakeInformation.cmake
CMake Error: CMAKE_DESCRIPTION_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_A game inspired by snake_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/home/shiyanlou/Code/DungeonRush/build/CMakeFiles/CMakeOutput.log".
shiyanlou:build/ (master) $ cmake ..                                 [20:39:16]
-- The CXX compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SDL2: /usr/lib/x86_64-linux-gnu/libSDL2.so (found version "2.0.4") 
-- Found SDL2main: /usr/lib/x86_64-linux-gnu/libSDL2main.a (found version "2.0.4") 
-- Found SDL2_image: /usr/lib/x86_64-linux-gnu/libSDL2_image.so (found version "2.0.1") 
-- Found SDL2_net: /usr/lib/x86_64-linux-gnu/libSDL2_net.so (found version "2.0.1") 
-- Found SDL2_mixer: /usr/lib/x86_64-linux-gnu/libSDL2_mixer.so (found version "2.0.1") 
-- Found SDL2_ttf: /usr/lib/x86_64-linux-gnu/libSDL2_ttf.so (found version "2.0.14") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shiyanlou/Code/DungeonRush/build
shiyanlou:build/ (master*) $ make                                    [20:40:02]
Scanning dependencies of target dungeon_rush
[  5%] Building C object CMakeFiles/dungeon_rush.dir/src/prng.c.o
[ 11%] Building C object CMakeFiles/dungeon_rush.dir/src/sprite.c.o
[ 16%] Building C object CMakeFiles/dungeon_rush.dir/src/net.c.o
[ 22%] Building C object CMakeFiles/dungeon_rush.dir/src/bullet.c.o
[ 27%] Building C object CMakeFiles/dungeon_rush.dir/src/player.c.o
[ 33%] Building C object CMakeFiles/dungeon_rush.dir/src/ai.c.o
[ 38%] Building C object CMakeFiles/dungeon_rush.dir/src/audio.c.o
[ 44%] Building C object CMakeFiles/dungeon_rush.dir/src/res.c.o
[ 50%] Building C object CMakeFiles/dungeon_rush.dir/src/map.c.o
[ 55%] Building C object CMakeFiles/dungeon_rush.dir/src/game.c.o
[ 61%] Building C object CMakeFiles/dungeon_rush.dir/src/types.c.o
[ 66%] Building C object CMakeFiles/dungeon_rush.dir/src/render.c.o
[ 72%] Building C object CMakeFiles/dungeon_rush.dir/src/weapon.c.o
[ 77%] Building C object CMakeFiles/dungeon_rush.dir/src/main.c.o
[ 83%] Building C object CMakeFiles/dungeon_rush.dir/src/helper.c.o
[ 88%] Building C object CMakeFiles/dungeon_rush.dir/src/storage.c.o
[ 94%] Building C object CMakeFiles/dungeon_rush.dir/src/ui.c.o
[100%] Linking C executable bin/dungeon_rush
[100%] Built target dungeon_rush
shiyanlou:build/ (master*) $ ls                                      [20:40:13]
bin  CMakeCache.txt  CMakeFiles  cmake_install.cmake  Makefile
shiyanlou:build/ (master*) $ cd bin                                  [20:40:22]
shiyanlou:bin/ (master*) $ ls                                        [20:40:26]
dungeon_rush  res
shiyanlou:bin/ (master*) $ ./dungeon_rush                            [20:40:27]
libpng warning: Duplicate iCCP chunk
shiyanlou:bin/ (master*) $ ./dungeon_rush                            [20:43:34]
libpng warning: Duplicate iCCP chunk
shiyanlou:bin/ (master*) $ ./dungeon_rush                            [20:43:48]
libpng warning: Duplicate iCCP chunk
shiyanlou:bin/ (master*) $ ./dungeon_rush                            [20:44:50]
libpng warning: Duplicate iCCP chunk
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2022-03-25,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档