[Haskell-cafe] sdl-mixer loading issue
dons at galois.com
Tue Jun 24 16:05:29 EDT 2008
> I am trying to use the SDL-mixer bindings to play wav files. I've hit
> a wierd error and I can't figure out how to solve it:
> Prelude> import Graphics.UI.SDL.Mixer.Music
> Prelude Graphics.UI.SDL.Mixer.Music> loadMUS "test.wav"
> Loading package SDL-0.5.4 ... linking ... done.
> Loading package SDL-mixer-0.5.2 ... linking ... <interactive>:
> unknown symbol `Mix_LoadWAV'
> ghc-6.8.2: unable to load package `SDL-mixer-0.5.2'
> I've looked up the source code; Mix_LoadWAV seems to be #defined, so I
> suspect it's some kind of library path issue but I don't grok the
> whole system well enough to figure it out; maybe someone could point
> me in the right direction?
> Have the issue now on Ubuntu 8.04 and previously had the same issue
> when I tested it on a FreeBSD box. I did install all of the
> "libsdl-*-dev" in the Ubuntu repo.
Ah, well spotted. I get the same issue on Arch, in ghci:
Prelude> import Graphics.UI.SDL.Mixer.Music
Prelude Graphics.UI.SDL.Mixer.Music> loadMUS
unknown symbol `Mix_LoadWAV'
ghc-6.8.2: unable to load package `SDL-mixer-0.5.2'
Looking in the source we see:
foreign import ccall unsafe "Mix_LoadWAV"
mixLoadWAV :: CString -> IO (Ptr ChunkStruct)
Lemmih, any ideas? -lSDL and -lSDL_mixer seem to be there.
More information about the Haskell-Cafe