I’m trying to follow this Vulkan set-up: https://www.youtube.com/watch?v=vhGDwnjNb5M
But, before vulkan even gets involved, I’m getting errors about undefined symbols for glfw.
error: undefined symbol: _glfwGetVersion
note: referenced by main.o:_main.main
I’m using GitHub - IridescenceTech/zglfw: A thin, idiomatic wrapper for GLFW. Written in Zig, for Zig! and ran brew install glfw
beforehand.
This is my build.zig, I imagine I’m not pointing to the right location for the lib files?
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "crumble",
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
}),
});
const glfw = b.dependency("zglfw", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("glfw", glfw.module("glfw"));
exe.addLibraryPath(.{ .cwd_relative = "/usr/local/lib/"});
b.installArtifact(exe);
...
Apologies if this is something simple that I’m missing.