Hi! I’m a bit lost with this compilation error.
I have added the following to my build.zig file:
const sdl = b.dependency("sdl", .{
.optimize = optimize,
.target = target,
});
exe.root_module.addImport("sdl3", sdl.module("sdl3"));
exe.root_module.linkSystemLibrary("vulkan", .{});
And I’m getting this error when I run it:
run
└─ run exe sdl_vulkan_test
└─ install
└─ install sdl_vulkan_test
└─ compile exe sdl_vulkan_test debug native failure
(pkg-config:2943551): GLib-CRITICAL **: 00:40:34.310: g_string_insert_len: assertion 'len == 0 || val != NULL' failed
error:
(pkg-config:2943551): GLib-CRITICAL **: 00:40:34.310: g_string_insert_len: assertion 'len == 0 || val != NULL' failed
As a test to make sure vulkan is installed, I confirmed that zig cc worked with this:
#include <vulkan/vulkan.h>
#include <stdio.h>
int main() {
VkInstanceCreateInfo instance_create_info = {0};
printf("%d", instance_create_info.sType);
return 0;
}
Does anyone have any suggestions or pointers for what I might be doing wrong? Thank you!