StudioCherno / Walnut

Walnut is a simple application framework for Vulkan and Dear ImGui apps
MIT License
1.99k stars 367 forks source link

VkCommandBuffer error, and member reference type 'void' is not a pointer #35

Closed NewSkyLine-dev closed 1 year ago

NewSkyLine-dev commented 1 year ago

I copied the files into my Project, and linked it with my CMake build system. But I get this error:

initial value of reference to non-const must be an lvalue
non-const lvalue reference to type 'VkCommandBuffer' (aka 'VkCommandBuffer_T *') cannot bind to a temporary of type 'void'

at line:

VkCommandBuffer& command_buffer = s_AllocatedCommandBuffers[wd->FrameIndex].emplace_back();

and:

m_LayerStack.emplace_back(std::make_shared<T>())->OnAttach();

with error:

member reference type 'void' is not a pointer

In file: Application.cpp and in file: Application.h

Any ideas?