ryupold / examples-raylib.zig

Example usage of raylib.zig bindings
MIT License
43 stars 4 forks source link

error: invalid builtin function: '@abs' #11

Open zet23t opened 10 months ago

zet23t commented 10 months ago

I am new to zig and wanted to give the raylib examples a try. Compiling it with zig 0.11.0 I am getting this error here:

Build Summary: 3/8 steps succeeded; 1 failed (disable with --summary none)
run transitive failure
└─ run raylib-zig-examples transitive failure
   ├─ zig build-exe raylib-zig-examples Debug native 1 errors
   └─ install transitive failure
      └─ install raylib-zig-examples transitive failure
         └─ zig build-exe raylib-zig-examples Debug native (+2 more reused dependencies)
src\examples\audio_stream\audio_stream.zig:102:17: error: invalid builtin function: '@abs'
                @abs(samples[i * music.stream.channels + channel]) * 5,

If I remove the @abs call, the compilation succeeds.