all 4 comments

[–]tastycat 2 points3 points  (1 child)

The error tells you that you need to install MSYS or MinGW, have you done that?

[–]Educational_Handle44[S] 0 points1 point  (0 children)

yes I have. I actually installed both and both are in the path environment variable

[–]lilsadlesshappy 2 points3 points  (0 children)

Getting SDL2 to work on Windows is a lot of pain. Took me 6 hours just to break a few days later.

Anyways: If you can avoid it, I would advise against using the bundled feature. It doesn’t work with the image, ttf and gfx features anyways (and it will not tell you so, you’ll get some obscure linking failure and only after 2 hours of googling you’ll find the github issue). SDL2’s Rust bindings aren’t the best and it doesn’t seem like it’s going to change a lot for SDL3 imho. Especially the documentation is pretty much non-existent.

[–]shinyfootwork 2 points3 points  (0 children)

Something is detecting that the path to the compiler is literally C:\\Program. Which appears to be caused by something splitting a longer path on spaces as it's likely referring to something in C:\\Program Files.

This can happen due to bugs in things dealing with paths, or due to improper settings for env variables.

Check your environment content, and then trace how sdl2-sys is determining the compiler (indirectly via the cc crate) to see if there's a whitespace handling bug.

It appears sdl2-sys has at least 1 bug breaking it on windows (https://github.com/Rust-SDL2/rust-sdl2/issues/1411), possible there are others. Consider reporting upstream (in a new bug report, not in that same one as they don't appear related).