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

windows build warning: SDL_GetRevisionNumber #542

Open
wushu037 opened this issue Oct 17, 2022 · 5 comments
Open

windows build warning: SDL_GetRevisionNumber #542

wushu037 opened this issue Oct 17, 2022 · 5 comments

Comments

@wushu037
Copy link

wushu037 commented Oct 17, 2022

I got an error when I tried to compile the windows platform
(Both compiling with cross-platform and compiling directly on windows gave me an error)
macos to windows
image

windows
image

@veeableful
Copy link
Contributor

Hi @wushu037, could you try with the latest version which is v0.4.25 and see if it's still happening? It seems like you were using v0.3.3.

@wushu037
Copy link
Author

Hi @veeableful , thank you very much, I tried it and now it compiles successfully.
(But there are some problems running. I'm using go-sdl2 indirectly from the gobot library, where should I ask)

@veeableful
Copy link
Contributor

Hi @wushu037, it seems like you have already asked in the right place! If you need a fix now, I think you may be able to just simply use older SDL2 versions such as 2.0.12 or maybe even 2.0.14.

On second look, it seems like the error is just a warning so maybe you were able to compile it? Did it produce the gamepad-keys-map executable?

@wushu037
Copy link
Author

Hi @veeableful , thank you for your interest!

1. I modified to the latest version and the warning is gone

2. oh, indeed. I updated the issue in gobot, thank you.
It does compile the executable. As for why I got the warnings and errors confused, it's because in the program I wrote myself, I still used robotgo and used it to call the system screenshot. (I actually just implemented a small function to map joystick shared keys to system shortcuts)

And when I compiled it on a Mac with the cross-platform compilation script provided in the readme for go-sdl2, not only did I get a warning from go-sdl2, but I also got a fatal error from robotgo. This caused me to describe the warning as an error in the description, so sorry about that
image

To be honest, I don't know how to fix this at the moment, because I'm not very familiar with that cross-platform compilation script provided by go-sdl2

@wushu037 wushu037 changed the title windows build error: SDL_GetRevisionNumber windows build warning: SDL_GetRevisionNumber Oct 20, 2022
@veeableful
Copy link
Contributor

Hi @wushu037, I think you could try using Docker or Podman to run the cross-compilation under Linux which seems to be a supported way of cross-compiling for robotgo. If you want to cross-compile on macOS, you might need to build zlib using the mingw-w64 tools so robotgo can use it but it might be more troublesome than just using Linux container to do it.

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

No branches or pull requests

2 participants