You are not logged in.

#1 2025-12-03 05:31:58

c>rust
Member
Registered: 2025-09-07
Posts: 20

ziglang 0.15.2 How to add dependency

I follow the instruction on https://zigzap.org/learn.html
adding this to
build.zig

    const zap = b.dependency("zap", .{
        .target = target,
        .optimize = optimize,
        .openssl = false, // set to true to enable TLS support
    });
    _ = zap;

get error

/home/mq/.cache/zig/p/zap-0.8.0-AAAAAHquIwC7Et6QVdWF7gsZyMnaQa1JpmD12ovhNyx7/facil.io/build.zig:10:18: error: no field or m
ember function named 'addStaticLibrary' in 'Build'

cause b.addStaticLibrary don't exist
and b.addModule seem to be the way but i dont know how to use it
Wed Dec  3 01:21:40 PM +07 2025 edit:
I test with nix: samething

Last edited by c>rust (2025-12-03 06:22:37)

Offline

Board footer

Powered by FluxBB