Vulkan Memory Allocator Implementation Errors after #define VMA_IMPLEMENTATION

  allocation, c++, memory, vulkan

Windows 10, Visual Studio Community 2019

I am following and it mentions to add #include "vk_mem_alloc.h" and if you compile you will get linker errors. Then it describes that you should put #define VMA_IMPLEMENTATION above the include in the vk_engine.cpp. I understand how this works, and I have only included the define once in the .cpp file.

Issues: before compiling that state ‘declaration is incompatible with …’ for some various functions throughout the header. Trying to compile gives me errors:

m_Lock unknown override specifier

m_Lock undeclared specifer

InitializeSWRLock is undefined

These issues range from lines 4089-4097, if you base it off the version of VMA found in the "all chapters" link below.

I even downloaded and tried to compile chapter 3, but I get the same issues. On the same lines. I am able to compile chapters 0, 1, and 2, but for some reason the #define VMA_IMPLEMENTATION gives me those specific errors, and I am unable to find out much about them online.

Source: Windows Questions C++