#Segfault when trying to call C function

1 messages · Page 1 of 1 (latest)

livid compass
#

So, I decided to give Zig a try and since I've been working with vulkan lately I decided to write a simple vulkan hello world but when I call vkCreateInstance I get a segfault on a null pointer. I checked all the pointers that I'm passing and they aren't null. the debugger doesn't help nor does valgrind. I tested the same code in C and it works so it's not my machine.

Here is the code: https://github.com/lolzdev/explora/blob/master/src/render/vulkan.zig#L86

GitHub

Contribute to lolzdev/explora development by creating an account on GitHub.

hushed sequoia
#

have you tried linking libc exe.linkLibC(); just a random suggestion, not sure if thats the issue tho