I’ve recently downloaded the Vulkan SDK and created a new C Project in Eclipse, to test out some boilerplate Vulkan code. I’ve definitely linked the vulkan-1.lib library and included all required header files in the SDK properly (In fact I’ve quadruple checked the build settings), and my graphics drivers definitely support Vulkan, as both vkcube.exe and vkcubepp.exe both run properly without any qualms. My code also compiles with 0 errors at all, yet whenever I try to execute it, it always crashes with this error:
There’s absolutely nothing on google searches that is related to my problem, could anyone help me with this?
In case it’s important, the IDE is Eclipse CDT, and this is the test code:
/*
============================================================================
Name : VulkanTest.c
Author : TheShermanTanker
Version :
Copyright : None
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include "vulkan/vulkan.h"
int main(void) {
puts("Hello World"); /* prints Hello World */
VkResult status;
VkInstance instance;
VkApplicationInfo applicationInfo = {};
VkInstanceCreateInfo instanceInfo = {};
applicationInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
applicationInfo.pNext = NULL;
applicationInfo.pApplicationName = "Vulkan Test";
applicationInfo.applicationVersion = VK_MAKE_VERSION(1, 2, 0);
applicationInfo.pEngineName = "Native Engine";
applicationInfo.engineVersion = VK_MAKE_VERSION(1, 2, 0);
applicationInfo.apiVersion = VK_API_VERSION_1_2;
instanceInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
instanceInfo.pApplicationInfo = &applicationInfo;
instanceInfo.enabledLayerCount = 0;
instanceInfo.enabledExtensionCount = 0;
instanceInfo.flags = 0;
status = vkCreateInstance(&instanceInfo, NULL, &instance);
if(status != VK_SUCCESS) {
puts("\nFailed to initialise Vulkan");
return status;
}
return EXIT_SUCCESS;
}
P.S.: By the way, when I say crash, it crashes even before the Hello World message can be displayed to console. Removing vkCreateInstance immediately resolves the crash