zig build works fine, but zig build run causes a pretty nondescriptive error:
C:\projects\sdl-zig-demo-master>zig build run
The following command exited with error code -1073741515:
cd C:\projects\sdl-zig-demo-master && zig-cache\sdl-zig-demo.exe
Build failed. The following command failed:
C:\Users\argontus\AppData\Local\zig\stage1\artifact\4iEWQpbmq9mZd9UnLBfxC-Meu1JzUydrqNVBB9CYkAZfVcX-98ag8yI8ap4AweG9\build.exe C:\Users\argontus\.zig\zig.exe C:\projects\sdl-zig-demo-master C:\projects\sdl-zig-demo-master\zig-cache run
Seems that the command fails as soon as any function declared in SDL.h is called.
EDIT: User error, turns out I misunderstood how linkSystemLibrary works and failed to manually copy SDL2.dll into zig-cache directory. Doing this solved the issue.
zig build
works fine, butzig build run
causes a pretty nondescriptive error:Seems that the command fails as soon as any function declared in SDL.h is called.
EDIT: User error, turns out I misunderstood how
linkSystemLibrary
works and failed to manually copySDL2.dll
intozig-cache
directory. Doing this solved the issue.