I keep getting a post denied error when I try to properly explain my problem but here is the short version.

compiling samples give error msc ver 1900 doenst match, how to fix?

Yeah, this forum is a bit paranoid and unlogs people before they can finish a paragraph. You need to reload and then log again (copy your post if afraid to lose it, or compile it beforehand in Notepad or something). Other reason for denying post is if you have links or images in your post (being new user). Depends what the error message was…

You will need to elaborate though. What samples? What VS are you using anyway?

Thanks for the reply, but I’m using VS 2017. I installed both build version the v140 and v141 both failed to compile any of the samples(vulkan versions 1.0.42 and 1.0.37). Already corrected a lot of compiler errors, last linker errors are mismatch errors relating to init_instance.cpp and shaderc_combine.lib.

I did try to write my own code, but I’m stuck at error -7 on creating surface.

I did not need the library, its the glslang that was not referenced.

Well VS 2017 came out like this week. There may be unforseen problems.
First you should make sure you are using the latestest Cmake you can get. Then that you generated the project using “-GVisual Studio 15 2017” (or Win64).
You can also try latest (master) versions of the demos in

There’s plenty other samples around too.
I offer mine too: which should be compiler agnostic; and I plan to test VS2017 soon anyway…
Some of the mainstream ones are from Sascha Willems
or maybe from
(sorry for omitting all the others)

As for trying your own code there are two rules:

  1. Enable Validation Layers
  2. Make sure you have Validation Layers enabled

error -7 means VK_ERROR_EXTENSION_NOT_PRESENT as you can find in the specification (despite being a spec, it is quite readable!).

You need to make sure you are not enabling some extension you do not have when doing vkCreateInstance and vkCreateDevice.

Then if you want to use windowing system in Vulkan and you are on Windows you need to enable “VK_KHR_surface” and “VK_KHR_win32_surface” using vkCreateInstance. And “VK_KHR_swapchain” using vkCreateDevice. You can use equivalent VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_WIN32_SURFACE_EXTENSION_NAME and VK_KHR_SWAPCHAIN_EXTENSION_NAME from vulkan.h respectively to avoid typing errors.