如何解决尝试使用CMake和MinGW从开源Git存储库编译源代码时出现编译错误
有关源代码的Github存储库在这里: https://github.com/arishackstv/cubemod
作为参考,这是我尝试根据自己的口味修改的Cubeworld游戏的mod。
存储库中有一个CMakeLists.txt,我用来生成MinGW makefile,因为创建者说该模块是使用MinGW在发布模式下构建的。这是我使用他的CMakeLists.txt的CMake配置: CMakeConfiguaration
它似乎生成了makefile,没有问题,所以我尝试制作。我遇到以下错误:Errors
错误包括:
In file included from C:/Users/[username]/Desktop/CUBEMO~1/src/core/hook/hooks/item_generation/hook_create_weapon.h:3:0,from C:\Users\[username]\Desktop\cubemod-master\src\core\main.cpp:8:C:/Users/[username]/Desktop/CUBEMO~1/src/core/hook/hook.h:21:76: error: 'JMP_BYTES' declared as an 'inline' fieldconst static inline uint8_t JMP_BYTES[]{0xFF,0x25,0x00,0x00};
C:/Users/[username]/Desktop/CUBEMO~1/src/core/hook/hook.h:23:35: error: 'installed_hooks' declared as an 'inline' fieldstatic inline std::vector<Hook*> installed_hooks;
C:/Users/[username]/Desktop/CUBEMO~1/src/core/hook/hooks/artifact/base_stats/hook_get_attack_power.h:10:71: error: call to non-constexpr function 'static uint64_t MemoryHelper::GetCubeBase()'static inline float* base_damage = (float*)(MemoryHelper::GetCubeBase() + 0x42E584);
更喜欢他们。我感到奇怪的是,源代码根本没有编译错误。我认为也许我的构建环境没有正确设置?这也是我的MinGW安装设置:MinGW setup.
如果某人 能够成功编译此代码,我很想听听您的构建设置,以便我了解需要更改的内容。也许需要其他版本的gcc?而且,如果是Github上的源代码版本有问题的话,那么我需要弄清楚需要进行哪些更改。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。