Linker Isn't Finding Vulkan Library

Hello Folks:

Developing on Windows 10 on Visual Studio and C++.

I’m starting my journey to Vulkan with the API Without Secrets tutorials. The first tutorial compiles, but fails to link with 74 errors like these:

1>Tutorial01.obj : error LNK2001: unresolved external symbol "void (__stdcall*(__stdcall* ApiWithoutSecrets::vkGetInstanceProcAddr)(struct VkInstance_T *,char const *))(void)" (?vkGetInstanceProcAddr@ApiWithoutSecrets@@3P6GP6GXXZPAUVkInstance_T@@PBD@ZA)

1>Tutorial01.obj : error LNK2001: unresolved external symbol "enum VkResult (__stdcall* ApiWithoutSecrets::vkCreateInstance)(struct VkInstanceCreateInfo const *,struct VkAllocationCallbacks const *,struct VkInstance_T * *)" (?vkCreateInstance@ApiWithoutSecrets@@3P6G?AW4VkResult@@PBUVkInstanceCreateInfo@@PBUVkAllocationCallbacks@@PAPAUVkInstance_T@@@ZA)

I prefer static libraries but a lot of libraries are DLL. For those I tell Visual Studio where to find the import library.

The tutorial uses:

`VulkanLibrary = LoadLibrary( "vulkan-1.dll" );`

I’m not familiar with this LoadLibrary((). I’m assuming no linking happens until the application is run and LoadLibrary() is called during. Why am I getting errors during the build?

I’ve also noticed that vulkan-1.dll isn’t in the drivers I received from Nvidia. The download had vulkan-1-x64.dl_ and vulkan-1-x86.dl_.

I’m building this tutorial code with the Vulkan SDK supplied Vulkan C++ Windowed Program template. I’m not sure how it differs from the Vulkan C++ Program template.

I’d appreciate any suggestions.

Thanks
Larry

LoadLibrary() is Winapi function to load a dll. The author does his own bespoke loading, so better ask him why.

I am pretty sure they get renamed to vulkan-1.dll while they get copied into %WINDIR%\System32 by the installation.

It is probably incompatible with it. The tutorial repo has its own Cmake. It also has its own vulkan.h at External\vulkan.h. Bit of a NIH syndrome…

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.