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
Each @cImport causes the file to be translated again creating new, distinct types. This is why it is advisable to only have one @cImport in your project. See the documentation here https://ziglang.org/documentation/master/#cImport.
Zig Version
0.10.0-dev.7729+b88151e0e
Steps to Reproduce
File
struct.h
File
struct.c
File
main.zig
File
other.zig
And then attempt to compile the code.
Expected Behavior
Successful compilation - this kind of aliasing can be done with Zig structs, so I would expect the same from c structs.
Actual Behavior
Compilation fails with this error message:
Which appears to be referencing different declarations of the same c struct (.cimport:1 vs .cimport:3)
The text was updated successfully, but these errors were encountered: