GLFW_NO_API not declared in scope, but seems to be linked correctly

I’m following this tutorial to learn Vulkan, and it gives me some code at the bottom (in the linux section, in the “setting up makefile project” part).

I used the vulkan & GLFW libraries included in my distribution’s package manager, so I’m using the most up-to-date vulkan (1.0.56 I think) and GLFW 3.1.2. I use Mint 18.1

But for some reason, GLFW_NO_API is not part of the header file, and causes a “not declared” error at compile time.

Shouldn’t this definition be part of any version of GLFW? Why might it not be in mine? How can I get around this?

GLFW_NO_API and Vulkan was added only in version 3.2:
Either check if your distribution has newer glfw package, or you’ll need to build glfw from source.


I managed to get 3.2 .debs from launchpad and installed them with DPKG, it works perfectly now, thanks :smiley: