I'm trying to integrate zgui into my renderer, which uses zglfw and vulkan-zig.
However, I'm getting the following errors:
error: undefined symbol: _ImGui_ImplGlfw_InitForVulkan
note: referenced by .zig-cache/o/0fded4198a5455cf859645677c411b12/renderer_zcu.o:_backend_glfw.initVulkan
error: undefined symbol: _ImGui_ImplVulkan_CreateFontsTexture
note: referenced by .zig-cache/o/0fded4198a5455cf859645677c411b12/renderer_zcu.o:_backend_vulkan.init
error: undefined symbol: _ImGui_ImplVulkan_Init
note: referenced by .zig-cache/o/0fded4198a5455cf859645677c411b12/renderer_zcu.o:_backend_vulkan.init
error: the following command failed with 3 compilation errors:
The missing functions are defined here:
https://github.com/zig-gamedev/zgui/blob/7bc9461997c402c1be9bc716388399404df1686e/src/backend_glfw.zig#L42
I expect them to be statically linked.
I'm not sure why they're not being resolved...
My build.zig looks like this:
const zgui = b.dependency(
"zgui",
.{
.target = target,
.optimize = optimize,
.backend = .glfw_vulkan,
},
);
const zgui_module = zgui.module("root");
const imgui = zgui.artifact("imgui");
imgui.addIncludePath(vulkan_headers.path("include"));
renderer_module.addImport("zgui", zgui_module);
renderer_module.linkLibrary(imgui);