“Ro”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
(以“nothing here guys”替换内容)
标签替换
 
(未显示同一用户的23个中间版本)
第1行: 第1行:
=pre=
+
nothing here guys
 
 
[[GCC 官方源码编译安装]]
 
dos2unix build_linux.sh
 
 
 
=doc=
 
参考
 
https://forum.ragezone.com/threads/source-code-ragnarok-origin-full.1227376/page-16
 
 
 
 
 
先要达标  我居然g++ 没达标就在搞 awkward
 
 
 
-cmake(>3.0.2)
 
-g++ (I'm using 9.2)
 
-redis (I'm using 6.2.7)
 
 
 
<pre>
 
I just add some extra steps in the previous guide. This is for 20gb version, not sure if it works for big one. I just start learning c++ recently, so maybe some steps are not ideal, and some steps may miss as well, just let me know. I will try to help.
 
 
 
## 2. Install compilation tools
 
-cmake(>3.0.2)
 
-g++ (I'm using 9.2)
 
-redis (I'm using 6.2.7)
 
-mysql (I have mysql installed previously, so if below step is not correct, just google it)
 
 
 
 
 
## 3. Connect resources  好像没有 cofig 这个目录吧  may 26  2025
 
- copy config, rogamelibs, roserver to your server root (not root folder)
 
- cd roserver
 
- open 111.sh, change icc_path to your g++ path, in my case, it is /opt/gcc-9.2/bin not  /usr/local/bin
 
- go to "/roserver/exe/gsconf", delete all folders except "script" and "serveronly", by doing this, we can link those folders from config folder with next step
 
- run ./111.sh /config
 
 
 
## 4. Install and compile dependent software
 
- Install mysql-devel, mysql version
 
```sh
 
yum install mysql-devel
 
yum install mysql-community-server.x86_64
 
```
 
 
 
## 5. Compile server
 
if you see "make -jx" especially "make -j128" in below sh files, just change it to "make -j<nb of your cpu core>"
 
 
 
- in /roserver/thirdparty, compile and install liboauth-0.9.4 and libevhtp-1.2.10
 
- build librogamelibs.a
 
open /rogamelibs/buildtool/build_linux.sh
 
change icc_path
 
change cmake command to below
 
"cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/LINUX.cmake -DCMAKE_BUILD_TYPE=Debug -DGCC=9.2.0 -DGCOV=Off -DASAN=Off -DLSAN=Off -DCMAKE_C_COMPILER=$icc_path/gcc -DCMAKE_CXX_COMPILER=$icc_path/g++ ../.."
 
then run build_linux.sh
 
- build libconfiglib.a  # bu ro1 没这个目录
 
open /rogamelibs/table/buildtool/build_linux.sh
 
change icc_path
 
change cmake command to below
 
"cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/LINUX.cmake -DCMAKE_C_COMPILER=$icc_path/gcc -DCMAKE_CXX_COMPILER=$icc_path/g++ ../.."
 
then run build_linux.sh
 
- go to /roserver/lib, check both librogamelibs.a and libconfiglib.a link to correct files
 
- cd /roserver/Build/Debug
 
- run "make" to build all servers, or you can go to each server folder, then build it one by one
 
- Comment out the files that are not found in the code (Be patient, it is not too many)
 
 
 
 
 
## 6. Configure mysql
 
- Start mysql
 
- Run the .sql files under /roserver/exe/sql/create_sql and update_sql
 
- Add a piece of server information to the gateinfo table under database login
 
(Example server_id channel state is_open server_name zone_name ipaddr free_ipaddr register_account online_role open_time full_register_time combine_serverid
 
1 1 1 1 mzx sywc your_server_ip:10110 0 0 2024-04-15 08:00:00 2024-04-15 08:00:00 0)
 
- **Possible problems:**
 
- (1) mysql cannot be started
 
The error message is that there is already a file in a certain folder. Modify the path pointed to by data in /etc/my.cnf.
 
- (2) mysql query and modify the initial password query and modify
 
```sh
 
grep "temporary password" /var/log/mysqld.log
 
mysqladmin -u root -p oldpasswd password newpasswd
 
```
 
- (3) Timestamp default value invalid when running .sql
 
The most direct way to modify sql_mode
 
```sh
 
set sql_mode='';
 
```
 
## 7. Configure redis
 
- configure your redis in /roserver/exe/gsconf/serveronly/game_redis_conf.json
 
 
 
## 8. Generate and modify the server configuration file
 
- copy my conf.zip file, then unzip to /roserver/Build/Debug/bin
 
- Modify the xml files of each server in roserver/Build/Debug/bin/conf. Fill in the mysql account password database information.
 
If you want to start multiple gameservers, copy gs_conf.xml and modify the line information in it.
 
- copy my run_server_command.zip, then replace start,status and stop with my ones
 
 
 
## 9. Open port for 25009 (default 25001 client port not work for me, no idea why) and 10110 (gate),
 
 
 
## 10. Install screen
 
 
 
## 11. Start the server
 
```sh
 
cd ./Build/Debug/bin
 
./start [any name]
 
```
 
screen related commands
 
```sh
 
screen -ls //View started servers
 
screen -r [server name] //Switch to each server window to ensure there are no errors
 
First ctrl+A and then D to exit the screen
 
```
 
 
 
2024-04-18 Update:
 
1. change 3 version numbers in "/roserver/exe/loginconf/version.txt" to "0.2.0.1" (this is client version number)
 
2. Missing files like below. You can copy from big zip ("Ro\rogamelibs\include\aidebug" and "Ro\rogamelibs\aidebug") or use my attachment. Comment out "shared_data.SerializeToPb" errors
 
ICP7}LB0KTL5)6PDD(PRG{9.jpg
 
 
 
3. in /roserver/thirdparty, compile and install liboauth-0.9.4 and libevhtp-1.2.10
 
4. update step 3
 
 
 
 
 
##my err
 
 
 
evan@s217-14 buildtool]$ ./build_linux.sh
 
-- compiler with develop
 
-- ASAN=On compiler with -fsanitize=address
 
-- Debug
 
--
 
CMake Error at CMakeLists.txt:163 (LIST):
 
  LIST sub-command REMOVE_ITEM requires two or more arguments.
 
 
 
 
 
-- Server Add Files!!
 
-- Configuring incomplete, errors occurred!
 
See also "/home/evan/rogamelibs/buildtool/build_linux/CMakeFiles/CMakeOutput.log".
 
make: *** 没有指明目标并且找不到 makefile。 停止。
 
make build_linux error!
 
 
 
 
 
 
 
</pre>
 
 
 
=err=
 
== build lib==
 
=== ro1 rogamelibs===
 
<pre>
 
 
 
ro1 ->rogamelibs build一下  may 27 2025
 
 
 
 
 
sudo yum install clang
 
 
 
 
 
cat /rogamelibs/buildtool/build_linux.sh
 
#/bin/bash
 
 
 
build_path="build_linux"
 
 
 
if [ ! -d $build_path ]
 
then
 
    mkdir $build_path
 
fi
 
 
 
cd $build_path
 
icc_path="/opt/gcc-9.2/bin"
 
compiler_flag="-DDevelop=On -DASAN=On"
 
if [ -f $icc_path/g++ ]
 
then
 
    #cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/LINUX.cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=$icc_path/gcc -DCMAKE_CXX_COMPILER=$icc_path/g++ $compiler_flag ../..
 
    cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/LINUX.cmake -DCMAKE_BUILD_TYPE=Debug -DGCC=9.2.0 -DGCOV=Off -DASAN=Off -DLSAN=Off -DCMAKE_C_COMPILER=$icc_path/gcc -DCMAKE_CXX_COMPILER=$icc_path/g++ ../..
 
    make -j10
 
else
 
    cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/LINUX.cmake -DCMAKE_BUILD_TYPE=Debug $compiler_flag ../..
 
    make -j8
 
fi
 
 
 
if [ $? == 0 ]
 
then
 
echo "make ${build_path} success!"
 
else
 
echo "make ${build_path} error!"
 
exit 28
 
fi
 
#
 
#cd .. && rm -rf build_linux
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
change icc_path
 
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/LINUX.cmake -DCMAKE_BUILD_TYPE=Debug -DGCC=9.2.0 -DGCOV=Off -DASAN=Off -DLSAN=Off -DCMAKE_C_COMPILER=$icc_path/gcc -DCMAKE_CXX_COMPILER=$icc_path/g++ ../..
 
 
 
 
 
 
 
[root@s build_linux]# head  /home/evan/may27/rogamelibs/CMakeLists.txt
 
cmake_minimum_required(VERSION 3.0.2)
 
 
 
project(ROGameLib)
 
 
 
CMake Error: Error in cmake code at
 
/home/evan/may27/rogamelibs/CMakeLists.txt:1:
 
Parse error.  Expected a command name, got unquoted argument with text "cmake_minimum_required".
 
-- Configuring incomplete, errors occurred!
 
 
 
 
 
解决
 
这表明 CMake 在读取 CMakeLists.txt 文件的 第一行 时,发现了一个 无法识别的字符,即:
 
 
 
cmake_minimum_required
 
 
 
这个开头的 ""(U+FEFF) 是 BOM(Byte Order Mark),它在某些文本编辑器(如 Windows 上的 Notepad 或一些 IDE)保存 UTF-8 文件时会自动加上。
 
 
 
解决方法
 
 
 
你需要删除这个 BOM 标记。以下是几种方法:
 
sed -i '1s/^\xEF\xBB\xBF//' /home/evan/may27/rogamelibs/CMakeLists.txt
 
 
 
 
 
May 28
 
/usr/include/c++/4.8.2/bits/functional_hash.h:58:12: 错误:‘struct std::hash<ROGameLibs::ROEventDefine>’的声明
 
    struct hash;
 
            ^
 
cc1plus: all warnings being treated as errors
 
make[2]: *** [CMakeFiles/rogamelibs.dir/games.cpp.o] 错误 1
 
make[1]: *** [CMakeFiles/rogamelibs.dir/all] 错误 2
 
make: *** [all] 错误 2
 
 
 
make[2]: *** [CMakeFiles/rogamelibs.dir/ai/nodes/ai_node_action.cpp.o] 错误 1
 
make[2]: *** [CMakeFiles/rogamelibs.dir/scene/scene_wave_spawner.cpp.o] 错误 1
 
cc1plus: all warnings being treated as errors
 
cc1plus: all warnings being treated as errors
 
make[2]: *** [CMakeFiles/rogamelibs.dir/ai/nodes/ai_node_scene.cpp.o] 错误 1
 
make[2]: *** [CMakeFiles/rogamelibs.dir/games.cpp.o] 错误 1
 
make[1]: *** [CMakeFiles/rogamelibs.dir/all] 错误 2
 
make: *** [all] 错误 2
 
make build_linux error!
 
make build_linux error!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/home/evan/may27/rogamelibs/../rogamelibs/include/system/scene_event.h:23:18:  required from here
 
/usr/include/c++/4.8.2/bits/hashtable_policy.h:1099:63: 错误:对不完全的类型‘struct std::hash<ROGameLibs::ROEventDefine>’的非法使用
 
      : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { }
 
                                                              ^
 
In file included from /usr/include/c++/4.8.2/bits/stl_bvector.h:1134:0,
 
                from /usr/include/c++/4.8.2/vector:65,
 
                from /home/evan/may27/rogamelibs/./ai/event_channel/ai_eventchannel_handler_role.h:4,
 
                from /home/evan/may27/rogamelibs/ai/event_channel/ai_eventchannel_handler_role.cpp:1:
 
/usr/include/c++/4.8.2/bits/functional_hash.h:58:12: 错误:‘struct std::hash<ROGameLibs::ROEventDefine>’的声明
 
    struct hash;
 
            ^
 
In file included from /usr/include/c++/4.8.2/bits/hashtable.h:35:0,
 
                from /usr/include/c++/4.8.2/unordered_map:47,
 
                from /home/evan/may27/rogamelibs/./utility/utiltool.h:6,
 
                from /home/evan/may27/rogamelibs/./core/event/event.h:8,
 
                from /home/evan/may27/rogamelibs/./ai/event_channel/ai_eventchannel_handler_role.h:8,
 
                from /home/evan/may27/rogamelibs/ai/event_channel/ai_eventchannel_handler_role.cpp:1:
 
/usr/include/c++/4.8.2/bits/hashtable_policy.h:1099:63: 错误:对不完全的类型‘struct std::hash<ROGameLibs::ROEventDefine>’的非法使用
 
      : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { }
 
                                                              ^
 
In file included from /usr/include/c++/4.8.2/bits/stl_bvector.h:1134:0,
 
                from /usr/include/c++/4.8.2/vector:65,
 
                from /home/evan/may27/rogamelibs/./ai/event_channel/ai_eventchannel_handler_role.h:4,
 
                from /home/evan/may27/rogamelibs/ai/event_channel/ai_eventchannel_handler_role.cpp:1:
 
/usr/include/c++/4.8.2/bits/functional_hash.h:58:12: 错误:‘struct std::hash<ROGameLibs::ROEventDefine>’的声明
 
    struct hash;
 
            ^
 
make[2]: *** [CMakeFiles/rogamelibs.dir/ai/event_channel/ai_eventchannel_handler_role.cpp.o] 错误 1
 
make[1]: *** [CMakeFiles/rogamelibs.dir/all] 错误 2
 
make: *** [all] 错误 2
 
make build_linux error!
 
 
 
</pre>
 
 
 
 
 
<pre>
 
os: centos8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
make 不过
 
[root@localhost buildtool]# ./build_linux.sh
 
[ 21%] Building CXX object CMakeFiles/rogamelibs.dir/table_manager/entity_type_table_mgr.cpp.o
 
[ 21%] Building CXX object CMakeFiles/rogamelibs.dir/table_manager/equip_map_string_int_mgr.cpp.o
 
/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())
 
                                                  ^~~~~~~~~~~~~~~~
 
[ 22%] Building CXX object CMakeFiles/rogamelibs.dir/table_manager/guild_hunt_table_manager.cpp.o
 
[ 22%] Building CXX object CMakeFiles/rogamelibs.dir/table_manager/gvg_quest_table_manager.cpp.o
 
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@localhost buildtool]# bash build_linux_release.sh
 
[  1%] Building CXX object CMakeFiles/rogamelibs_release.dir/table_manager/mercenary_table_mgr.cpp.o
 
/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_release.dir/build.make:2316: CMakeFiles/rogamelibs_release.dir/table_manager/entity_table_manager.cpp.o] Error 1
 
make[2]: *** Waiting for unfinished jobs....
 
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/rogamelibs_release.dir/all] Error 2
 
make: *** [Makefile:91: all] Error 2
 
 
 
成功了在table里面的脚本
 
 
 
[root@localhost buildtool]# pwd
 
/home/evan/rogamelibs/table/buildtool
 
 
 
dos2unix buildtool/build_linux.sh
 
./build_linux.sh
 
 
 
-- Build files have been written to: /home/evan/rogamelibs/table/buildtool/build_linux
 
Consolidate compiler generated dependencies of target configlib
 
[100%] Built target configlib
 
make build_linux success!
 
 
 
 
 
</pre>
 
 
 
===table ===
 
<pre>
 
 
 
 
 
cat /rogamelibs/table/buildtool/build_linux.sh
 
#/bin/bash
 
 
 
build_path="build_linux"
 
 
 
if [ ! -d $build_path ]
 
then
 
    mkdir $build_path
 
fi
 
 
 
cd $build_path
 
icc_path="/opt/gcc-9.2/bin"
 
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/LINUX.cmake -DCMAKE_C_COMPILER=$icc_path/gcc -DCMAKE_CXX_COMPILER=$icc_path/g++ ../..
 
#cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/LINUX.cmake ../..
 
make -j8
 
 
 
if [ $? == 0 ]
 
then
 
echo "make ${build_path} success!"
 
else
 
echo "make ${build_path} error!"
 
exit 28
 
fi
 
#
 
#cd .. && rm -rf build_linux
 
 
 
 
 
 
 
 
 
 
 
#改这里 就行了 但是重新搞个新目录 又不可以了 怪了 注意gcc 版本
 
cd $build_path
 
icc_path="/usr/bin"
 
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/LINUX.cmake -DCMAKE_C_COMPILER=$icc_path/gcc -DCMAKE_CXX_COMPILER=$icc_path/g++ ../..
 
 
 
 
 
  4%] Building CXX object CMakeFiles/configlib.dir/open_world_influence_table_manager.cpp.o
 
In file included from /home/evan/may27/rogamelibs/table/template/../parser/table_parser.h:10:0,
 
                from /home/evan/may27/rogamelibs/table/template/../parser/common_parser.h:7,
 
                from /home/evan/may27/rogamelibs/table/template/../table_data.h:19,
 
                from /home/evan/may27/rogamelibs/table/template/global_table.h:4,
 
                from /home/evan/may27/rogamelibs/table/global_table_manager.cpp:2:
 
/home/evan/may27/rogamelibs/table/../rocommongamelibs/utility/log/log_engine.h: In instantiation of ‘bool ROGameLibs::LogEngine::ClassGameLibLog(ROGameLibs::LOGCLASSNAMETYPE, ROGameLibs::LOGTYPE, const char*, Args ...) [with Args = {const char*, const char*, int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >}]’:
 
/home/evan/may27/rogamelibs/table/global_table_manager.cpp:770:13:  required from here
 
/home/evan/may27/rogamelibs/table/../rocommongamelibs/utility/log/log_engine.h:109:24: 错误:不能通过‘...’传递有不能平凡复制的类型‘class std::basic_string<char>’
 
                result = Trace(class_name, fmt, std::forward<Args>(args)...);
 
                        ^
 
/home/evan/may27/rogamelibs/table/../rocommongamelibs/utility/log/log_engine.h:112:24: 错误:不能通过‘...’传递有不能平凡复制的类型‘class std::basic_string<char>’
 
                result = Debug(class_name, fmt, std::forward<Args>(args)...);
 
                        ^
 
/home/evan/may27/rogamelibs/table/../rocommongamelibs/utility/log/log_engine.h:115:24: 错误:不能通过‘...’传递有不能平凡复制的类型‘class std::basic_string<char>’
 
 
[  4%] Building CXX object CMakeFiles/configlib.dir/parser/string_util.cpp.o
 
make[2]: *** [CMakeFiles/configlib.dir/global_table_manager.cpp.o] 错误 1
 
make[2]: *** 正在等待未完成的任务....
 
make[1]: *** [CMakeFiles/configlib.dir/all] 错误 2
 
make: *** [all] 错误 2
 
make build_linux error!
 
[root@s217-14 buildtool]# ls
 
build_linux  build_linux_lsan.sh  build_linux.sh  cmake  Server
 
[root@s217-14 buildtool]# pwd
 
 
 
 
 
#on  may 27  ok
 
/table/weather_table_mgr.cpp
 
-- Configuring done
 
-- Generating done
 
CMake Warning:
 
  Manually-specified variables were not used by the project:
 
 
 
 
 
 
 
</pre>
 
 
 
=== 可能还有的问题===
 
 
 
  /roserver/lib/librogamelibs_release.a  还没搞
 
 
 
== game==
 
<pre>
 
 
 
/home/evan/may27/roserver/Build/Debug/gameserver
 
[evan@s217-14 gameserver]$
 
 
 
[  5%] Built target rogame_pb
 
Scanning dependencies of target gameserver
 
[  5%] Building CXX object gameserver/CMakeFiles/gameserver.dir/achievement/achievement_data_mgr.cpp.o
 
In file included from /home/evan/roserver/rogamelibs/dungeons/dungeons.h:7:0,
 
                from /home/evan/roserver/rogamelibs/dungeons/pve_dungeons.h:3,
 
                from /home/evan/roserver/rogamelibs/dungeons/common_battle_dungeons.h:4,
 
                from /home/evan/roserver/rogamelibs/dungeons/maze_dungeons.h:4,
 
                from /home/evan/roserver/rogamelibs/core/event/net_event.h:10,
 
                from /home/evan/roserver/gameserver/achievement/achievement_data_mgr.h:14,
 
                from /home/evan/roserver/gameserver/achievement/achievement_data_mgr.cpp:2:
 
/home/evan/roserver/rogamelibs/table_manager/dungeons_table_manager.h: 在成员函数‘const int32_t& ROGameLibs::DungeonsTableManager::RowData::MonsterWaveFreshType() const’中:
 
/home/evan/roserver/rogamelibs/table_manager/dungeons_table_manager.h:63:0: 错误:返回临时变量的引用 [-Werror=return-local-addr]
 
            inline const int32_t& MonsterWaveFreshType() const { return table_row ? table_row->MonsterWaveFreshType() : TableLib::DefaultValue<int32_t>::value; }
 
^
 
In file included from /usr/include/c++/4.8.2/bits/hashtable.h:35:0,
 
                from /usr/include/c++/4.8.2/unordered_map:47,
 
                from /home/evan/roserver/gameserver/./pch.h:18,
 
                from /home/evan/roserver/gameserver/achievement/achievement_data_mgr.cpp:1:
 
/usr/include/c++/4.8.2/bits/hashtable_policy.h: In instantiation of ‘struct std::__detail::_Hash_code_base<ROGameLibs::ROEventDefine, std::pair<const ROGameLibs::ROEventDefine, std::vector<std::function<void(std::shared_ptr<ROGameLibs::ROEvent>&)> > >, std::__detail::_Select1st, std::hash<ROGameLibs::ROEventDefine>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>’:
 
/usr/include/c++/4.8.2/bits/hashtable_policy.h:1402:10:  required from ‘struct std::__detail::_Hashtable_base<ROGameLibs::ROEventDefine, std::pair<const ROGameLibs::ROEventDefine, std::vector<std::function<void(std::shared_ptr<ROGameLibs::ROEvent>&)> > >, std::__detail::_Select1st, std::equal_to<ROGameLibs::ROEventDefine>, std::hash<ROGameLibs::ROEventDefine>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<true, false, true> >’
 
/usr/include/c++/4.8.2/bits/hashtable.h:174:11:  required from ‘class std::_Hashtable<ROGameLibs::ROEventDefine, std::pair<const ROGameLibs::ROEventDefine, std::vector<std::function<void(std::shared_ptr<ROGameLibs::ROEvent>&)> > >, std::allocator<std::pair<const ROGameLibs::ROEventDefine, std::vector<std::function<void(std::shared_ptr<ROGameLibs::ROEvent>&)> > > >, std::__detail::_Select1st, std::equal_to<ROGameLibs::ROEventDefine>, std::hash<ROGameLibs::ROEventDefine>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >’
 
/usr/include/c++/4.8.2/bits/unordered_map.h:100:18:  required from ‘class std::unordered_map<ROGameLibs::ROEventDefine, std::vector<std::function<void(std::shared_ptr<ROGameLibs::ROEvent>&)> > >’
 
/home/evan/roserver/rogamelibs/include/system/scene_event.h:55:68:  required from here
 
/usr/include/c++/4.8.2/bits/hashtable_policy.h:1070:12: 错误:对不完全的类型‘struct std::hash<ROGameLibs::ROEventDefine>’的非法使用
 
    struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2,
 
 
 
</pre>
 
 
 
==cmake==
 
<pre>
 
sudo curl -LO https://github.com/Kitware/CMake/releases/download/v3.27.9/cmake-3.27.9-linux-x86_64.tar.gz
 
  791  tar xvf  cmake-3.27.9-linux-x86_64.tar.gz
 
  792  whereis cmake
 
  793  file /usr/bin/cmake
 
  794  ll  /usr/bin/cmake
 
  795  ls
 
  796  mv  cmake-3.27.9-linux-x86_64 cmake-3.27.9
 
  797  mv /usr/bin/cmake  /usr/bin/cmakebak
 
  798  ln -s cmake-3.27.9/bin/cmake /usr/bin/cmake
 
  799  cmake --version
 
  800  whereis cmake
 
  801  file  /usr/bin/cmake
 
  802  rm  /usr/bin/cmake
 
  803  ln -s /home/evan/cmake-3.27.9/bin/cmake /usr/bin/cmake
 
  804  cmake
 
  805  cmake --version
 
 
 
</pre>
 
 
 
==other ==
 
<pre>
 
 
 
[  0%] Building CXX object CMakeFiles/rogamelibs.dir/ai/event_channel/ai_event_channel.cpp.o
 
[  0%] Building CXX object CMakeFiles/rogamelibs.dir/ai/event_channel/ai_eventchannel_handler.cpp.o
 
[  1%] Building CXX object CMakeFiles/rogamelibs.dir/ai/ai_online_debug_manager.cpp.o
 
[  2%] Building CXX object CMakeFiles/rogamelibs.dir/ai/event_channel/ai_eventchannel_handler_monster.cpp.o
 
/home/evan/rogamelibs/ai/ai_node_copy_myself.cpp:1:10: 致命错误:rocommongamelibs/utility/object_pool/object_pool.h:没有那个文件或目录
 
#include "rocommongamelibs/utility/object_pool/object_pool.h"
 
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
编译中断。
 
make[2]: *** [CMakeFiles/rogamelibs.dir/build.make:90:CMakeFiles/rogamelibs.dir/ai/ai_node_copy_myself.cpp.o] 错误 1
 
make[2]: *** 正在等待未完成的任务....
 
In file included from /home/evan/rogamelibs/./ai/event_channel/scene_event_weather.h:3,
 
                from /home/evan/rogamelibs/ai/event_channel/ai_event_channel.cpp:1:
 
/home/evan/rogamelibs/./core/timer_manager.h:7:10: 致命错误:utility/delegate.h:没有那个文件或目录
 
#include "utility/delegate.h"
 
          ^~~~~~~~~~~~~~~~~~~~
 
编译中断。
 
make[2]: *** [CMakeFiles/rogamelibs.dir/build.make:146:CMakeFiles/rogamelibs.dir/ai/event_channel/ai_event_channel.cpp.o] 错误 1
 
In file included from /home/evan/rogamelibs/ai/ai_node_factory.cpp:1:
 
/home/evan/rogamelibs/./ai/ai_node_factory.h:6:10: 致命错误:rocommongamelibs/utility/singleton.h:没有那个文件或目录
 
#include "rocommongamelibs/utility/singleton.h"
 
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
编译中断。
 
make[2]: *** [CMakeFiles/rogamelibs.dir/build.make:104:CMakeFiles/rogamelibs.dir/ai/ai_node_factory.cpp.o] 错误 1
 
In file included from /home/evan/rogamelibs/ai/event_channel/ai_eventchannel_handler.cpp:2:
 
/home/evan/rogamelibs/./core/event/event.h:8:10: 致命错误:utility/utiltool.h:没有那个文件或目录
 
#include "utility/utiltool.h"
 
          ^~~~~~~~~~~~~~~~~~~~
 
编译中断。
 
In file included from /home/evan/rogamelibs/./ai/event_channel/ai_eventchannel_handler_monster.h:7,
 
                from /home/evan/rogamelibs/ai/event_channel/ai_eventchannel_handler_monster.cpp:1:
 
/home/evan/rogamelibs/./core/event/event.h:8:10: 致命错误:utility/utiltool.h:没有那个文件或目录
 
#include "utility/utiltool.h"
 
          ^~~~~~~~~~~~~~~~~~~~
 
编译中断。
 
/home/evan/rogamelibs/ai/ai_tree_manager.cpp:4:10: 致命错误:utility/common.h:没有那个文件或目录
 
#include "utility/common.h"
 
          ^~~~~~~~~~~~~~~~~~
 
编译中断。
 
make[2]: *** [CMakeFiles/rogamelibs.dir/build.make:160:CMakeFiles/rogamelibs.dir/ai/event_channel/ai_eventchannel_handler.cpp.o] 错误 1
 
make[2]: *** [CMakeFiles/rogamelibs.dir/build.make:132:CMakeFiles/rogamelibs.dir/ai/ai_tree_manager.cpp.o] 错误 1
 
make[2]: *** [CMakeFiles/rogamelibs.dir/build.make:174:CMakeFiles/rogamelibs.dir/ai/event_channel/ai_eventchannel_handler_monster.cpp.o] 错误 1
 
In file included from /home/evan/rogamelibs/ai/ai_online_debug_manager.cpp:3:
 
/home/evan/rogamelibs/./ai/ai_online_debug_manager.h:8:10: 致命错误:thirdparty/tinyxml2/tinyxml2.h:没有那个文件或目录
 
#include "thirdparty/tinyxml2/tinyxml2.h"
 
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
编译中断。
 
make[2]: *** [CMakeFiles/rogamelibs.dir/build.make:118:CMakeFiles/rogamelibs.dir/ai/ai_online_debug_manager.cpp.o] 错误 1
 
In file included from /home/evan/rogamelibs/./ai/nodes/ai_node.h:7,
 
                from /home/evan/rogamelibs/./ai/ai_behavior_tree.h:4,
 
                from /home/evan/rogamelibs/ai/ai_behavior_tree.cpp:1:
 
/home/evan/rogamelibs/./ai/shared_data.h:11:10: 致命错误:rocommongamelibs/utility/math/vector3.h:没有那个文件或目录
 
#include "rocommongamelibs/utility/math/vector3.h"
 
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
编译中断。
 
make[2]: *** [CMakeFiles/rogamelibs.dir/build.make:76:CMakeFiles/rogamelibs.dir/ai/ai_behavior_tree.cpp.o] 错误 1
 
make[1]: *** [CMakeFiles/Makefile2:83:CMakeFiles/rogamelibs.dir/all] 错误 2
 
make: *** [Makefile:91:all] 错误 2
 
make build_linux error!
 
[root@MengZhan buildtool]# cat /etc/redhat-release
 
CentOS Linux release 8.0.1905 (Core)
 
[root@MengZhan buildtool]#
 
 
 
 
 
</pre>
 

2025年5月31日 (六) 02:14的最新版本

nothing here guys