ikskuh / SDL.zig

A shallow wrapper around SDL that provides object API and error handling
MIT License
360 stars 79 forks source link

sdl2_image not linked on macos #155

Closed jmmk closed 9 months ago

jmmk commented 9 months ago

When trying to run the example that includes the png image, I was getting several errors, e.g.

error: undefined reference to symbol _IMG_LoadBMP_RW

I was able to solve this by adding a line to my build.zig:

exe.linkSystemLibrary("sdl2_image");

If I am not mistaken, that line is missing here: https://github.com/MasterQ32/SDL.zig/blob/master/build.zig#L414

ikskuh commented 9 months ago

Won't fix: See here (https://github.com/MasterQ32/SDL.zig/issues/47)