BoomingTech/Piccolo

三方库头文件问题

Closed this issue · 0 comments

Describe the bug | Bug描述
在JoltPhysics部分,出现多处类似下面展示的标准整数类型定义缺失问题

/home/furrymonster/Projects/GameEngine/Piccolo/engine/3rdparty/JoltPhysics/Build/../Jolt/Math/Math.h:161:31: error: unknown type name 'uint32'; did you mean 'uint'?
  161 | inline uint32 GetNextPowerOf2(uint32 inValue)
      |                               ^~~~~~
      |                               uint

通过在对应文件的line:218处插入#include 解决。

同时在解决上述问题后,在source/runtime/function/render/interface部分出现三处标准输入输出头文件缺失问题

In file included from /home/furrymonster/Projects/GameEngine/Piccolo/engine/source/runtime/function/render/interface/vulkan/vulkan_vma.cpp:4:
/home/furrymonster/Projects/GameEngine/Piccolo/engine/3rdparty/vulkanmemoryallocator/include/vk_mem_alloc.h:2813:9: error: use of undeclared identifier 'snprintf'
 2813 |         snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
      |         ^
/home/furrymonster/Projects/GameEngine/Piccolo/engine/3rdparty/vulkanmemoryallocator/include/vk_mem_alloc.h:2817:9: error: use of undeclared identifier 'snprintf'
 2817 |         snprintf(outStr, strLen, "%llu", static_cast<unsigned long long>(num));
      |         ^
/home/furrymonster/Projects/GameEngine/Piccolo/engine/3rdparty/vulkanmemoryallocator/include/vk_mem_alloc.h:2821:9: error: use of undeclared identifier 'snprintf'
 2821 |         snprintf(outStr, strLen, "%p", ptr);
      |         ^

在vulkanmemoryallocator/include/vk_mem_alloc.h的line:2570处添加#include 后解决。

Steps to reproduce | 如何复现
Steps to reproduce the behavior:

  1. 在项目根目录下执行./build_linux release make
  2. 等待第一个bug出现
  3. 按照上述解决方案修复第一处bug
  4. 重新执行,等待第二个bug出现
  5. 按照上述方案修复后,成功编译并运行

Expected behavior | 预期行为
建立/build,构建目标文件,同时编译输出/bin目录下的可执行程序

Actual behavior | 实际行为
同上述bug

Screenshots/Logs | 截图/日志
除上述编译错误外,无其他编译错误

Desktop | 桌面环境

  • OS: Linux 6.11.0-25-generic
  • Version: #25~24.04.1-Ubuntu
  • CPU: 13th Gen Intel(R) Core(TM) i5-1334U
  • GPU: Intel Corporation Raptor Lake-P [UHD Graphics]
  • Memory 8GB
  • Compiler: gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0