Build problems

Hi. If there is one area of zig that keeps giving me problems its the build files. I’m trying to build zig-miniaudio which was last updated 3 years ago so I guess its on a fairly old version of Zig. It would be pretty helpful if at the top of build files it would say what version was used. I’ve tried 10.1 and 11 but both fail and from the documentation I can’t figure out what I should change.

The first error is on this line.
const compile_type: enum { pre_compiled, compiled } = if (std.builtin.os.tag == .windows) .pre_compiled else .compiled;
error: root struct of file ‘builtin’ has no member named ‘os’

In the docs I can see that builtin is a namespace and os also a namespace but in different versions. However os namespace has no .tag. Zig helpfully says use fmt to update files but that seems to do nothing. Can anyone point me in the right direction please.

Here’s the current proposal to address this issue: add a field to build manifest file for minimum zig version · Issue #14475 · ziglang/zig · GitHub

Thanks, that would solve the problem when building a project and it is the first step in checking out something you intend to integrate into your own project. At the moment thats capi and zig-miniaudio. For me there isn’t enough info and examples on the build system to know how to update as it seems to be a bit of a moving target.