我正在尝试编译一个使用 vulkan hpp 的程序,它在名为 vulkan_driver.h 的文件中使用一个方法,如下所示:
// Evaluate f and if result is not a success throw proper vk exception.
#define CHECK_VK_RESULT(x) do { \
vk::Result res = vk::Result(x); \
int tmp = 0; \
vk::createResultValue(res, tmp, __FILE__ ":" TOSTRING(__LINE__)); \
} while (0)
当我编译时出现以下错误:
[ 199s] In file included from /home/abuild/rpmbuild/BUILD/decaf-emu-20220508T212126/src/libgpu/src/vulkan/vulkan_driver.cpp:2:
[ 199s] /home/abuild/rpmbuild/BUILD/decaf-emu-20220508T212126/src/libgpu/src/vulkan/vulkan_driver.cpp: In member function 'void vulkan::Driver::initialise(vk::Instance, vk::PhysicalDevice, vk::Device, vk::Queue, uint32_t)':
[ 199s] /home/abuild/rpmbuild/BUILD/decaf-emu-20220508T212126/src/libgpu/src/vulkan/vulkan_driver.h:36:8: error: 'createResultValue' is not a member of 'vk'; did you mean 'createResultValueType'?
[ 199s] 36 | vk::createResultValue(res, tmp, __FILE__ ":" TOSTRING(__LINE__)); \
[ 199s] | ^~~~~~~~~~~~~~~~~
[ 199s] /home/abuild/rpmbuild/BUILD/decaf-emu-20220508T212126/src/libgpu/src/vulkan/vulkan_driver.cpp:89:4: note: in expansion of macro 'CHECK_VK_RESULT'
[ 199s] 89 | CHECK_VK_RESULT(vmaCreateAllocator(&allocatorCreateInfo, &mAllocator));
[ 199s] | ^~~~~~~~~~~~~~~
[ 199s] make[2]: *** [src/libgpu/CMakeFiles/libgpu.dir/build.make:647: src/libgpu/CMakeFiles/libgpu.dir/src/vulkan/vulkan_driver.cpp.o] Error 1
我该如何解决这个错误?