Game
跳到导航
跳到搜索
贪吃蛇
#pre sudo yum install mesa-libGL-devel yum install libudev-devel sudo yum install gcc-c++ cmake make libX11-devel libXrandr-devel \ freetype-devel openal-soft-devel libjpeg-turbo-devel \ libvorbis-devel flac-devel wget https://www.sfml-dev.org/files/SFML-2.5.1-sources.zip unzip SFML-2.5.1-sources.zip cd SFML-2.5.1 mkdir build && cd build cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release make -j$(nproc) sudo make install sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/sfml.conf' sudo ldconfig # 安装依赖(Ubuntu示例) sudo apt install sfml2.5-dev g++ #代码 https://github.com/evan886/snake_game.git # 创建构建目录 mkdir build && cd build # 生成Makefile cmake .. -DCMAKE_BUILD_TYPE=Release # 编译 make -j$(nproc) # 运行 ./SnakeGame
err
[100%] Linking CXX executable ../bin/dbserver /home/evan/roserver/lib/linux/9.2.0/libprotobuf.a(common.o): In function `google::protobuf::internal::LogMessage::operator<<(google::protobuf::uint128 const&)': common.cc:(.text+0x6c7): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()' /home/evan/roserver/lib/linux/9.2.0/libprotobuf.a(int128.o): In function `google::protobuf::operator<<(std::ostream&, google::protobuf::uint128 const&)': int128.cc:(.text+0x6f8): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()' collect2: error: ld returned 1 exit status make[2]: *** [dbserver/CMakeFiles/dbserver.dir/build.make:3479: bin/dbserver] Error 1 make[1]: *** [CMakeFiles/Makefile2:431: dbserver/CMakeFiles/dbserver.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 [root@evan-NUC11PAHi5 dbserver]#
怎么搞
换台centos7 ? 全 ro1 and then 全 ro
ro
centos8
jdk
https://repo.huaweicloud.com:8443/artifactory/java-local/jdk/8u151-b12/
compile lib
第一个没成功 第二个成功 [root@evan-NUC11PAHi5 roserver]# ls lib/librogamelibs.a -l lrwxrwxrwx. 1 root root 50 May 17 09:18 lib/librogamelibs.a -> ../rogamelibs/buildtool/Server/lib/librogamelibs.a [root@evan-NUC11PAHi5 roserver]# ll lib/libconfiglib.a lrwxrwxrwx. 1 root root 55 May 17 09:18 lib/libconfiglib.a -> ../rogamelibs/table/buildtool/Server/lib/libconfiglib.a [root@evan-NUC11PAHi5 roserver]# /home/evan/rogamelibs/table_manager/entity_table_manager.cpp: In member function 'virtual bool ROGameLibs::EntityTableManager::Init()': /home/evan/rogamelibs/table_manager/entity_table_manager.cpp:88:33: error: 'class TableLib::EntityHandBookTable::RowData' has no member named 'RelationEntityId' if (!book_row_data->RelationEntityId().empty()) ^~~~~~~~~~~~~~~~ /home/evan/rogamelibs/table_manager/entity_table_manager.cpp:90:50: error: 'class TableLib::EntityHandBookTable::RowData' has no member named 'RelationEntityId' for (int32_t id : book_row_data->RelationEntityId()) ^~~~~~~~~~~~~~~~ make[2]: *** [CMakeFiles/rogamelibs.dir/build.make:2316: CMakeFiles/rogamelibs.dir/table_manager/entity_table_manager.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/rogamelibs.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 make build_linux error! [root@evan-NUC11PAHi5 buildtool]#
trouble shooting
[ 7%] Linking CXX executable ../bin/masterserver /usr/bin/ld: cannot find -loauth /usr/bin/ld: cannot find -lcrypto collect2: error: ld returned 1 exit status make[2]: *** [masterserver/CMakeFiles/masterserver.dir/build.make:12594: bin/masterserver] Error 1 make[1]: *** [CMakeFiles/Makefile2:803: masterserver/CMakeFiles/masterserver.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 [root@evan-NUC11PAHi5 masterserver]# sudo dnf install liboauth-devel openssl-devel