Zeno
Zeno

Reputation: 135

Visual studio cannot open source file <vulkan.h>

I've looked it up and the internet says to simply add the directory. But I have already done that (I believe).

This is the folder: it is C:\VulkanSDK\1.1.126.0\Include\vulkan (maybe i'm wrong?)

this is the place where I included the folder:

This is the line of code: #include the error says "cannot open source file"vulkan.h"

I have also tried including just the "Include" folder and then typing in code "include" but that dint work either.

Thank you for helping me.

Upvotes: 2

Views: 6776

Answers (1)

Jherico
Jherico

Reputation: 29240

First off, you want include path to be C:\VulkanSDK\1.1.126.0\Include directory, not C:\VulkanSDK\1.1.126.0\Include\vulkan directory. The correct include declaration is:

#include <vulkan/vulkan.h>

Second, I would suggest adding the include to the Additional Include Directories, as seen here:

enter image description here

Upvotes: 5

Related Questions