Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust-sdl2 fails to build on Windows #980

Closed
RainbowCookie32 opened this issue Apr 3, 2020 · 3 comments · Fixed by #985
Closed

rust-sdl2 fails to build on Windows #980

RainbowCookie32 opened this issue Apr 3, 2020 · 3 comments · Fixed by #985

Comments

@RainbowCookie32
Copy link

I ran into this issue while trying to set up Github Actions with my project. The Linux build passes just fine, but for some reason, the same build on Windows fails. The offending lines seem to the on rwops.rs

((*self.raw).read.unwrap())(self.raw, buf.as_ptr() as *mut c_void, 1, out_len as u64)

((*self.raw).write.unwrap())(self.raw, buf.as_ptr() as *const c_void, 1, in_len as u64)

More specifically, the as u64 cast. The build output complains that both lines should be using as u32 instead, which does fix the build, but I'm not sure if it's the proper fix or if there's something else going on that I'm not aware of.

I attached both the normal and the verbose build logs below. My project builds using both bundled and static-link btw.

output_normal.log
output_verbose.log

@sY9sE33
Copy link

sY9sE33 commented Apr 5, 2020

For the time being, rev = "4e81db5" compiles on windows.

@RainbowCookie32
Copy link
Author

Yup, it does build. I'll leave the issue open until the regression is fixed then, I assume

@Cobrand
Copy link
Member

Cobrand commented Apr 7, 2020

My bad, in those two lines we need to replace as u64 into as sys::size_t and it should compile.

saucesaft added a commit to saucesaft/rust-sdl2 that referenced this issue Apr 16, 2020
sypwex pushed a commit to sypwex/rust-sdl2 that referenced this issue Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants