-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error building raylib #40
Comments
I'm having a similar issue. When looking at the Zig standard library documentation, |
Same problem but with master version: const std = @import("std");
const rl = @import("raylib/build.zig");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "zigaroids",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
rl.addTo(b, exe, target, optimize, .{});
b.installArtifact(exe);
const run_exe = b.addRunArtifact(exe);
b.step("run", "Run Zigaroids!").dependOn(&run_exe.step);
} With error: expected type 'Target.Query', found 'Build.ResolvedTarget'
rl.addTo(b, exe, target, optimize, .{});
^~~~~~
/home/fenilli/.zig/zig-0.13.0-dev/lib/std/Build.zig:2485:28: note: struct declared here
pub const ResolvedTarget = struct {
^~~~~~
/home/fenilli/.zig/zig-0.13.0-dev/lib/std/Target/Query.zig:1:1: note: struct declared here
//! Contains all the same data as `Target`, additionally introducing the Edit: Changing the target error: no field named 'path' in union 'Build.LazyPath'
exe.root_module.addAnonymousImport("raylib", .{ .root_source_file = .{ .path = cwd ++ sep ++ "raylib.zig" } });
^~~~
/home/fenilli/.zig/zig-0.13.0-dev/lib/std/Build.zig:2133:22: note: union declared here
pub const LazyPath = union(enum) { |
same problem on 0.12.0 |
|
Maybe try #41 (comment) like I did? Worked for me at Zig 0.12 |
FYI this is all builtin to raylib:
Instructions here worked for me: https://www.reddit.com/r/Zig/comments/16r0fj6/ysk_you_can_use_native_raylib_directly_in_zig_for/ |
You can, that is what I'm using, but those are not crafted with zig in mind, they are just direct translations so you have to do bit casting and all by hand, just a bit more work over a working binding. |
Same problem with zig 0.14.0
|
Anybody got a solution for this? I too experience this on zig 0.13 SNAP package on Ubuntu. It's driving me crazy, I have no idea how to solve this. /devel/zig-game/raylib/build.zig:102:77: error: no field named 'path' in union 'Build.LazyPath' |
Check PR #46 |
Hi, i followed the instruction in the documentation, but i have this error:
my zig version is: 0.11.0
The text was updated successfully, but these errors were encountered: