Not-Nik / raylib-zig

Manually tweaked, auto-generated raylib bindings for zig. https://github.com/raysan5/raylib
MIT License
703 stars 123 forks source link

artifact name 'raylib' is ambiguous #172

Closed Heusini closed 2 weeks ago

Heusini commented 2 weeks ago

I get an error if I try to include raylib after updating this package in a project: Error message:

thread 83664 panic: artifact name 'raylib' is ambiguous /home/xxx/Downloads/zig/lib/std/Build.zig:1879:41: 0x145b5a8 in artifact (build) if (found != null) panic("artifact name '{s}' is ambiguous", .{name}); ^ /home/xxx/repos/Zig/raylib_test/build.zig:24:48: 0x1418c9e in build (build) const raylib_artifact = raylib_dep.artifact("raylib");`

I tried compiling in an empty project to see if it is my projects problem. Unfortunately I got the same error in an empty project with a simple build script:

const raylib_dep = b.dependency("raylib-zig", .{
        .target = target,
        .optimize = optimize,
    });

    const raylib = raylib_dep.module("raylib");
    const raylib_artifact = raylib_dep.artifact("raylib");

    const exe = b.addExecutable(.{
        .name = "raylib_test",
        .root_source_file = b.path("src/main.zig"),
        .target = target,
        .optimize = optimize,
    });

    exe.root_module.addImport("raylib", raylib);
    exe.linkLibrary(raylib_artifact);

    // This declares intent for the executable to be installed into the
    // standard location when the user invokes the "install" step (the default
    // step when running `zig build`).
    b.installArtifact(exe);

My Zig version: 0.14.0-dev.1294+df6907f60 (This could be a problem but wasn't a problem before)

Not-Nik commented 2 weeks ago

Caused by the fix to #170. I'll have to solve it another way