[Haskell-cafe] sdl-mixer loading issue

Don Stewart dons at galois.com
Tue Jun 24 16:07:02 EDT 2008

> On Tue, 24 Jun 2008, Norbert Wojtowicz wrote:
> >Hello,
> >
> >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"
> Is the package installed? Otherwise you may have to give an -lSDL_mixer 
> option when starting ghci.

That's not enough, for some reason:

    $ ghci -lSDL_mixer
    Prelude>  import Graphics.UI.SDL.Mixer.Music
    Prelude Graphics.UI.SDL.Mixer.Music> loadMUS "test.wav"
    unknown symbol `Mix_LoadWAV'
    ghc-6.8.2: unable to load package `SDL-mixer-0.5.2'

Despite it being defined in 

    $ grep Mix_LoadWAV /usr/lib/*      
    Binary file /usr/lib/libSDL_mixer-1.2.so.0 matches
    Binary file /usr/lib/libSDL_mixer-1.2.so.0.2.6 matches
    Binary file /usr/lib/libSDL_mixer.a matches
    Binary file /usr/lib/libSDL_mixer.so matches


More information about the Haskell-Cafe mailing list