zig
zig copied to clipboard
Code runs on Linux and macOS but freezes up compiling on Windows
I don't know how to get more information from the compiler for this one (extra logging). I'll describe the issue here and if you let me know how to add some more useful information/logs I can get them for you. Everything works fine on macOS and Linux but on Windows the compiler hangs at "Executing task: zig build run".
main.zig
const fna_image = @import("fna_image");
// later in main
_ = fna_image.load(device, "assets/font.png");
fna_image.zig
pub fn load(device: ?*c_void, file: [*c]const u8) i32 {
// uncommenting this line on Windows cause the Zig compiler to freeze
// on "Executing task: zig build run" with no other logs
// var rw = sdl.SDL_RWFromFile(file, "rb");
return 1;
}
label:os-windows
I think I'm experiencing the same issue. In my case it manifests when I attempt to @cInclude
the SDL2/SDL.h
header and use some sdl
functionality in two separate zig files. No problems if I keep all the sdl calls in one file.
I end up with a couple of hanging zig.exe
instances which I have to kill before I can build again. Possibly some kind of compile time ambiguity/race? Happy to collect more info.
@Chris-E-J-Ellis that's #4568?
@Chris-E-J-Ellis that's #4568?
Ah, you're completely correct, should have done a bit more searching before my comment, just saw sdl
was mentioned and thought this one looked similar.