Closed EugeneGlevsky closed 3 years ago
I read in the source that: Mix_OpenAudioDevice is not supported before SDL 2.0.9 I am installed this, my sdl2-config --version shows: 2.0.9 but this error still exists. Any ideas?
Hi @EugeneGlevsky, what does pkg-config --cflags sdl2
print? Could you use the printed include directory to find SDL_version.h
and verify that the version is at least 2.0.9?
pkg-config --cflags sdl2 return: -D_REENTRANT -I/usr/include/SDL2 I fount SDL_version.h and open, in the source I can see:
SDL_MAJOR_VERSION 2 SDL_PATCHLEVEL 9
But if I try to run: sudo apt install libsdl2-mixer-dev it says: is already the newest version (2.0.1+dfsg1-1)
In the current moment I comment this function in source code and it is compiling without errors and working. But I want to fix it without this way.
Ahh sorry, it appears the message was wrong. It needs SDL2_mixer 2.0.2. I will correct it right away.
@veeableful Thank you so much. I make pull in my version from git and now I can see this:
# github.com/veandco/go-sdl2/mix ../extgo/src/github.com/veandco/go-sdl2/mix/sdl_mixer.go:28:32: error: missing binary operator before token "(" //#if !(SDL_MIXER_VERSION_ATLEAST(2,0,2))
Hmm perhaps the Go version is out of date. Could you tell me which version is your Go toolchain?
go version go1.15.6 linux/amd64
Ahh I think it must be the gcc version then. Could you try installing newer GCC? I'm using GCC 10 and the problem doesn't appear to me.
Ok, thank you so much!
Ubuntu 16.04 try to use this example: https://github.com/veandco/go-sdl2-examples/tree/4298a5894b3ec15532eb78de70c71a528095865e/examples/audio_wav_memory and get an error:
How can I fix it?