Closed heysokam closed 1 week ago
Somebody sent some help my way on discord:
// @section GLFW + Vulkan Compatibility code
const vk = @import("./vulkan/vk.zig");
pub const instance = struct {
const Func = *const fn (instance: vk.Instance, procname: [*:0]const u8) vk.PfnVoidFunction;
pub const getProc :instance.Func= @ptrCast(&c.glfwGetInstanceProcAddress);
};
pub const surface = struct {
const Func = *const fn (instance: vk.Instance, window :?*glfw.Window, allocator :?*const vk.AllocationCallbacks, surface :*const vk.SurfaceKHR) vk.Result;
pub const create :surface.Func= @ptrCast(&c.glfwCreateWindowSurface);
};
Hi there
I'm getting this error when I compile the
triangle.zig
example from CLI (no zig build, justzig run {opts} thefile.zig
), but the example works normally when usingexamples/build.zig
This is the failing code: https://github.com/heysokam/vulkan/blob/13a30424e8bbe5403f181a5ce398c0c2ee7e0b6c/zig/triangle.zig#L197-L1306
I can imagine I'm doing something wrong with my
zig run file.zig
compilation step/setup but can't find what it is Any ideas on how to approach it?