Closed shinymerlyn closed 1 year ago
Yea, it's caused by the fact that Capy always targets the latest Zig master version. The 34bf939 commit was made to fix compile errors introduced by the API change added in zig ceb0a63. To fix the bug, just download and install the latest Zig version from the website: https://ziglang.org/download/
The quick start docs don't say anything about targeting zig master. should I open a ticket for that?
@zenith391 I can't build the template with the latest Zig version either (0.11.0-dev.1594+a5d25fabd)
error: no field or member function named 'standardReleaseOptions' in 'Build'
const mode = b.standardReleaseOptions();
~^~~~~~~~~~~~~~~~~~~~~~~
/snap/zig/6551/lib/std/Build.zig:1:1: note: struct declared here
const std = @import("std.zig");
^~~~~
referenced by:
runBuild__anon_5869: /snap/zig/6551/lib/std/Build.zig:1565:37
main: /snap/zig/6551/lib/build_runner.zig:214:16
remaining reference traces hidden; use '-freference-trace' to see all reference traces
the relevant Zig commit, I believe: https://github.com/ziglang/zig/commit/063888afff75f9d91fd221d84e1b74b111304ac3
It would be indeed nicer if README explicitly mentions exact Zig version.
You might need to pull latest commits as this was fixed in 60cfed7
However you're right in that explicitly mentioning the exact Zig version would be better. I'll add this to the README.
@zenith391 the main repo is fixed, however the template still uses old format https://github.com/capy-ui/zig-template/blob/2a94b8a073c68a4dc04c12bda39a97418a652657/build.zig#L15
I'd also mention prerequisites somewhere (sudo apt install libgtk-3-dev
in my case)
Anyway, got it working, all good.
Building on windows
Guessing it's due to this commit, or one nearby it: https://github.com/capy-ui/capy/commit/34bf939515504e4a1a63a6904e4afc4ce8d53a98
repro:
expected: it builds without errors
actual: