#Imported package has no types (unknown)

1 messages · Page 1 of 1 (latest)

solid flint
#

This my build.zig

const std = @import("std");
const freetype = @import("libs/mach-freetype/build.zig");

const alloc = std.heap.c_allocator;

pub fn build(b: *std.build.Builder) !void {
    const mode = b.standardOptimizeOption(.{});
    const target = b.standardTargetOptions(.{});
    const bin = b.addExecutable(.{
        .name = "myproject",
        .optimize = mode,
        .target = target,
        .root_source_file = .{ .path = "src/main.zig" },
    });

    bin.addModule("freetype", freetype.module(b));
    freetype.link(b, bin, .{});

    b.installArtifact(bin);

    const run_cmd = b.addRunArtifact(bin);
    run_cmd.step.dependOn(b.getInstallStep());
}

When I do const freetype = @import("freetype") it has type unknown, how to fix this?

brittle hemlock
#

it has type unknown
What do you mean by that? What error do you get?

solid flint