validation layer , with vulkan.hpp

all the vulkan function work proparly exept one (i have an linker error with it)

here my code:


void GameManager::setupDebugCallback()
{
	if (!enableValidationLayers)
		return;

	vk::DebugReportCallbackCreateInfoEXT createInfo;
	createInfo.flags = vk::DebugReportFlagBitsEXT::eError | vk::DebugReportFlagBitsEXT::eWarning;
	createInfo.pfnCallback = debugCallback;

	/*
	PFN_vkVoidFunction createDebugReportCallback = VK_NULL_HANDLE;
	createDebugReportCallback = instanceOfVk.getProcAddr("vkCreateDebugReportCallbackEXT");
	createDebugReportCallback();
	*/

	debugCallBackHandle = instanceOfVk.createDebugReportCallbackEXT(createInfo);

}

VKAPI_ATTR VkBool32 VKAPI_CALL GameManager::debugCallback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objType, uint64_t obj, size_t location, int32_t code, const char * layerPrefix, const char * msg, void * userData)
{
	std::cerr << "validation layer: " << msg << std::endl;
	
	return VK_FALSE;
}


if i remove this line :
debugCallBackHandle = instanceOfVk.createDebugReportCallbackEXT(createInfo);
everything will work fine , but with this line of code i get :

Error LNK2019 unresolved external symbol vkCreateDebugReportCallbackEXT referenced in function "public: class vk::DebugReportCallbackEXT __cdecl vk::Instance::createDebugReportCallbackEXT(struct vk::DebugReportCallbackCreateInfoEXT const &,class vk::Optional<struct vk::AllocationCallbacks const >)const VulkanLearning C:\Users\Orleg\Documents\Visual Studio 2017\Projects\VulkanLearning\VulkanLearning\GameManager.obj 1

thanks.

The static Vulkan Loader only loads core and WSI functions automagically. Rest you need to load yourself (or with the help of other tools).
I shamelessly refer you to my answer on SO: Vulkan load vkCreateDebugReportCallbackEXT - Stack Overflow

[QUOTE=krOoze;42137]The static Vulkan Loader only loads core and WSI functions automagically. Rest you need to load yourself (or with the help of other tools).
I shamelessly refer you to my answer on SO:[/QUOTE]

thank you very much :).