Build error
I follow the instruct:
in your build.zig's build function, add the following before b.installArtifact(exe):
const zap = b.dependency("zap", .{ .target = target, .optimize = optimize, .openssl = false, // set to true to enable TLS support }); exe.root_module.addImport("zap", zap.module("zap"));
Got the error:
error: ld.lld: undefined symbol: http_listen ld.lld: undefined symbol: fio_start
If add exe.linkLibrary(zap.artifact("facil.io")); again, It's OK
I have the same problem, but adding that extra line (either before or after exe.root_module.addImport...) doesn't fix the problem for me.
I'm using zig 0.12.0 installed with zigup. Cloning the zap repo and then executing zig build run works, so I think it's not about my zig version.
Please see instructions in the release notes. You need to add the following line as well:
exe.linkLibrary(zap.artifact("facil.io"));
The README is based on the master version of zap which is a bit ahead. Recently, I merged a PR that makes the above line obsolete. Hence, it's not in the readme anymore.
I hope I can push out a new version soon so this issue won't persist for long.