So I have raylib running via simple zon dependency, with all the great work done to have dependencies arrive and the raylib build work. This is in 0.12.0 release and raylib current.
If I do zig build it builds, and zig build run makes it run, perfectly.
However, if I just try a zig run src/main.zig then it complains:
src\main.zig:2:16: error: C import failed
const raylib = @cImport(@cInclude("raylib.h"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src\main.zig:2:16: note: libc headers not available; compilation does not link against libc
...AppData\Local\zig\o\a3003dadc96a33bc65606add55ab48f4\cimport.h:1:10: error: 'raylib.h' file not found
#include <raylib.h>
^
I know the exe built just fine, so am I expecting too much ? I understand that perhaps zig run doesn't have all the benefits of the build system, so perhaps this is to be expected ?
Alongside this, how do I specify any additional options to raylib ? The dependency is added via the following:
const raylib_dep = b.dependency("raylib", .{
.target = target,
.optimize = optimize,
});
and I note in the build.zig for raylib that there are many options, but I can't figure out how to set them (for example, enabling raygui).
Thanks for any pointers.