Open figurae opened 9 months ago
Hey, I am aware of this problem and a related issue is open in the examples repo.
I just don't know how to fix it. The include paths are added correctly but the linker cannot find the header files.
Oof, that's unfortunate. I've tried poking and prodding it, but it's out of my depth. So far, staying on ziglang/zig@c89bb3e141ee215add0b52930d48bffd8dae8342 has been my only solution.
Oh, and thanks for great bindings. Been using them for the past few months. :)
I just ran into this and is quite frustrating. Should this package be part of Andrew's list of real world package uses?
I haven't figured out exactly what's going on here, but I had the same error message and the following worked for me:
std.build.FileSource.relative(...)
to std.Build.LazyPath.relative(...)
@cInclude
statements to have full paths to the header files. E.g. @cInclude("raylib.h")
to @cInclude("C:\Dev\deleteme\raylib\raylib\src\raylib.h")
. Note that "marshal.h" is in different dir from the other header files.#include
statementsYes, it's not pretty, but got my builds working until a proper fix comes around. I'm running on MacOS, so you may want to double check the correctness of the example path given above that it works in Windows.
Zig version 0.12.0-dev.11683+d5fc3c635.
I haven't figured out exactly what's going on here, but I had the same error message and the following worked for me:
1. raylib/build.zig: Replace all `std.build.FileSource.relative(...)` to `std.Build.LazyPath.relative(...)` 2. raylib/raylib.zig: Edit all `@cInclude` statements to have full paths to the header files. E.g. `@cInclude("raylib.h")` to `@cInclude("C:\Dev\deleteme\raylib\raylib\src\raylib.h")`. Note that "marshal.h" is in different dir from the other header files. 3. raylib/marshal.h: Same as above - add full paths to the .h files in all `#include` statements
Yes, it's not pretty, but got my builds working until a proper fix comes around. I'm running on MacOS, so you may want to double check the correctness of the example path given above that it works in Windows.
Zig version 0.12.0-dev.11683+d5fc3c635.
Indeed this works (I only had to also update marshal.h to point at the right paths).
I can confirm - std.Build.LazyPath.relative(...)
This may be related: https://github.com/raysan5/raylib/pull/3835
I don't know if something's changed, but today std.build.FileSource.relative
worked fine for me, I only had to put absolute paths in raylib.zig
and marshal.h
to use the latest builds (and update the signature of rlLoadFramebuffer
).
Hi,
I tried using yesterday's commit (bd561b3689bc4e703f46bf1908633abb09680b4b), thanks for adapting to latest zig build changes (btw, I think usage section should now say
raylib.addTo(b, exe, target.query, mode, .{});
), but I can't seem to build it properly now. I'm getting this:This is a clean repo with just raylib.zig, zig version 0.12.0-dev.2341+92211135f, Windows 11 22631.3085