hexops / mach-glfw-vulkan-example

mach-glfw Vulkan example
https://machengine.org/pkg/mach-glfw/
Other
40 stars 11 forks source link

Compile Error on MacOS #18

Open athieman opened 4 months ago

athieman commented 4 months ago

Build Summary: 14/19 steps succeeded; 1 failed (disable with --summary none) run transitive failure └─ run mach-glfw-vulkan-example transitive failure ├─ zig build-exe mach-glfw-vulkan-example Debug native 1 errors └─ install transitive failure └─ install mach-glfw-vulkan-example transitive failure └─ zig build-exe mach-glfw-vulkan-example Debug native (+14 more reused dependencies) src/graphics_context.zig:150:18: error: no field named 'enumerate_portability_bit_khr' in struct 'vk.InstanceCreateFlags' .enumerate_portability_bit_khr = true, ^~~~~~~~~ /Users/andrew/.cache/zig/p/1220aff94214342c77f1c4477d524f31c45e09c2472266a3af9a22502ae41c55b48e/vk.zig:161:40: note: struct declared here pub const InstanceCreateFlags = packed struct {


referenced by:
    main: src/main.zig:69:35
    callMain: /Users/andrew/Library/Application Support/Code/User/globalStorage/ziglang.vscode-zig/zig_install/lib/std/start.zig:574:32
    remaining reference traces hidden; use '-freference-trace' to see all reference traces
athieman commented 2 months ago

@slimsag , I was able to find a solution, but it uses a hard coded string and an int for an enum. I wasn't able to find Zig equivalents of the Vulkan macro and enum. The application builds and runs on MacOS with these two changes. I then tried to make a branch, but I didn't have permission, so I forked the project. I will delete the fork if you want, but for now I hope it will be a way for the required changes to be seen. Here's a link to the commit.