AzerothCore (ZhengPeiRu21) Playerbots模块未正确编译。

huangapple go评论100阅读模式
英文:

AzerothCore (ZhengPeiRu21) Playerbots module not compiling correctly

问题

我一直在尝试编译 ZhengPeiRu21 的 playerbot 模块(https://github.com/ZhengPeiRu21/mod-playerbots),但未成功。我使用了 azerothcore 中的正确代码树,就像在 readme.md 中描述的那样:https://github.com/ZhengPeiRu21/azerothcore-wotlk/tree/Playerbot

Cmake 过程没有问题,但当我运行编译时,出现了很多关于 playerbot 模块的错误。

以下是一些示例:

22>C:\...\AC\pb\azerothcore-wotlk\modules\mod-playerbots\src\ChatFilter.cpp(166,47): error C2039: 'GetTargetIcon': is not a member of 'Group'
22>C:\...\AC\pb\azerothcore-wotlk\src\server\game\Entities\Player\Player.h(59,7): message : see declaration of 'Group'
22>PlayerbotAI.cpp
22>C:\...\AC\pb\azerothcore-wotlk\modules\mod-playerbots\src\RandomItemMgr.h(20,6): warning C5257: 'EquipmentSlots': enumeration was previously declared without a fixed underlying type (compiling source file C:\Users\Jvandeneeckhout\Downloads\AC\pb\azerothcore-wotlk\modules\mod-playerbots\src\GuildTaskMgr.cpp)
22>C:\...\AC\pb\azerothcore-wotlk\modules\mod-playerbots\src\GuildTaskMgr.cpp(504,5): error C2065: 'PlayerbotsDatabasePreparedStatement': undeclared identifier
22>C:\...\AC\pb\azerothcore-wotlk\modules\mod-playerbots\src\GuildTaskMgr.cpp(504,42): error C2065: 'stmt': undeclared identifier

(部分路径已被替换为 '...' 以提高可读性)

C2065 是最常见的错误,但其他错误也存在。

如果有需要,完整的输出文件可以提供。

我认为我可能遗漏了一些关键步骤,这些步骤没有在任何地方描述,但我似乎找不到它。

我的第一个想法是在模块创建方面出错,但我能够:

  • 编译并运行核心,不使用模块,没有问题。
  • 编译并运行核心,编译其他模块,也没有问题。

如果有任何帮助,将不胜感激。

  • git clone https://github.com/ZhengPeiRu21/azerothcore-wotlk.git
  • 移动到已下载代码的 modules 文件夹:
  • git clone https://github.com/ZhengPeiRu21/mod-playerbots.git
  • 运行 Cmake
  • 单击配置(configure)
  • 将 TOOLS-BUILD 设置为 all
  • 将 MODULE-MOD-PLAYERBOTS 设置为 static
  • 再次单击配置(没有错误)
  • 单击生成(generate)
  • 单击打开项目(open project)
  • VS 2022 打开了该项目
  • 将项目设置为 RelWithDebInfo 和 X64
  • 右键单击 BUILD-ALL > 清除(clean)
  • 右键单击 BUILD-ALL > 编译(Build)

期望结果:无错误的编译
结果:带有错误的编译

英文:

I have been trying to get the ZhengPeiRu21 playerbot module (https://github.com/ZhengPeiRu21/mod-playerbots) to compile without success. I use the correct tree of azerothcore as described in the readme.md for this: https://github.com/ZhengPeiRu21/azerothcore-wotlk/tree/Playerbot

The Cmake process runs without issues, but when I run my compilation I a lot of errors on the playerbot module.

some examples:

22>C:\...\AC\pb\azerothcore-wotlk\modules\mod-playerbots\src\ChatFilter.cpp(166,47): error C2039: 'GetTargetIcon': is not a member of 'Group'
22>C:\...\AC\pb\azerothcore-wotlk\src\server\game\Entities\Player\Player.h(59,7): message : see declaration of 'Group'
22>PlayerbotAI.cpp
22>C:\...\AC\pb\azerothcore-wotlk\modules\mod-playerbots\src\RandomItemMgr.h(20,6): warning C5257: 'EquipmentSlots': enumeration was previously declared without a fixed underlying type (compiling source file C:\Users\Jvandeneeckhout\Downloads\AC\pb\azerothcore-wotlk\modules\mod-playerbots\src\GuildTaskMgr.cpp)
22>C:\...\AC\pb\azerothcore-wotlk\modules\mod-playerbots\src\GuildTaskMgr.cpp(504,5): error C2065: 'PlayerbotsDatabasePreparedStatement': undeclared identifier
22>C:\...\AC\pb\azerothcore-wotlk\modules\mod-playerbots\src\GuildTaskMgr.cpp(504,42): error C2065: 'stmt': undeclared identifier

(part of the path has been replaced by '...' for readability)

The C2065 is the most occurring but other errors are also present.
The full output file can be made available if this would be helpfull.

I think I'm missing some vital step that is not described anywhere but cannot seem to find it.
My first thought was making a mistake in how modules are created but I was able to:

  • Compile and run the core without modules without issues.
  • Compile and run the core with compiles other modules without issues.

Any assistance would be greatly appreciated.

expect: compilation without errors
Result: compilation with errors

答案1

得分: 1

You pull wrong branch for "azerothcore-wotlk"... When you clone git you need choose playerbot branch not master.
Use git clone https://github.com/ZhengPeiRu21/azerothcore-wotlk.git --branch Playerbot --single-branch

英文:

You pull wrong branch for "azerothcore-wotlk"... When you clone git you need choose playerbot branch not master.
Use git clone https://github.com/ZhengPeiRu21/azerothcore-wotlk.git --branch Playerbot --single-branch

huangapple
  • 本文由 发表于 2023年4月4日 18:08:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/75928109.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定