zig version: 0.12.0-dev.2075+f5978181e
I took the following code from https://ziglang.org/learn/samples/:
const ray = @cImport({
@cInclude("raylib.h");
});
pub fn main() void {
const screenWidth = 800;
const screenHeight = 450;
ray.InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
defer ray.CloseWindow();
ray.SetTargetFPS(60);
while (!ray.WindowShouldClose()) {
ray.BeginDrawing();
defer ray.EndDrawing();
ray.ClearBackground(ray.RAYWHITE);
ray.DrawText("Hello, World!", 190, 200, 20, ray.LIGHTGRAY);
}
}```
and tried building with `zig build-exe cimport.zig -lc -lraylib` as suggested. I got the following error:
```error: unable to find Dynamic system library 'raylib' using strategy 'paths_first'. searched paths: none```
after some trial and error, I came up with this: `zig build-exe main.zig -I./ -L./ -lc -lraylib`. I think I'm closer but it gives a bunch of `lld-link: undefined symbol` errors. I've suffered in the past with raylib and linking in c; if I remember correctly I may need more files to link, but I really don't know. Could anyone help?