You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is weird to describe, so I'm attaching a minimal reproduction project with a build.zig file. Even though in the passed -I generated directory the foo.h is there, the compilation fails foo.zip
Another related issue that came up when doing the reproduction scenario is #19839 . In my own project where this issue came up when trying to upgrade to 0.12, apart from the missing header issue (which could be bypassed by hardcoding the header path to an absolute path), the compiler was just crashing. I hope that these 2 issues take care of the 0.12 issues I encountered. I also tried 0.13.0-dev.46+3648d7df1 but got the same results
Expected Behavior
Expecting the given project to compile with zig build
The text was updated successfully, but these errors were encountered:
actondev
added
the
bug
Observed behavior contradicts documented or intended behavior
label
May 2, 2024
This is a consequence of #18160: include paths (-I) are per-module now, so the clib library has to be linked to the binding module. If I change exe.linkLibrary(lib.artifact("foo")); to binding.linkLibrary(lib.artifact("foo"));, your example project builds for me (since binding is the module that's importing foo.h).
Zig Version
0.12.0
Steps to Reproduce and Observed Behavior
This is weird to describe, so I'm attaching a minimal reproduction project with a build.zig file. Even though in the passed
-I
generated directory thefoo.h
is there, the compilation failsfoo.zip
Another related issue that came up when doing the reproduction scenario is #19839 . In my own project where this issue came up when trying to upgrade to 0.12, apart from the missing header issue (which could be bypassed by hardcoding the header path to an absolute path), the compiler was just crashing. I hope that these 2 issues take care of the 0.12 issues I encountered. I also tried
0.13.0-dev.46+3648d7df1
but got the same resultsExpected Behavior
Expecting the given project to compile with
zig build
The text was updated successfully, but these errors were encountered: