[Haskell-beginners] problem with SDL-gfx

Martín Villagra mvillagra0 at gmail.com
Tue Dec 8 15:44:18 UTC 2015


Hello!
I hope you can help me. I'm trying to use SDL-gfx but it seems it isn't
linking it correctly. When I try to run this simple file with runhaskell:
import Graphics.UI.SDL.Primitives
main = putStrLn "Hello"

It gives:
sdl.test.hs: <command line>: can't load .so/.DLL for:
/home/username/.cabal/lib/i386-linux-ghc-7.10.2/SDL-gfx-0.6.0.1-6rhSP5mw8M00K9S8yASTVF/
libHSSDL-gfx-0.6.0.1-6rhSP5mw8M00K9S8yASTVF-ghc7.10.2.so
 (/home/username/.cabal/lib/i386-linux-ghc-7.10.2/SDL-gfx-0.6.0.1-6rhSP5mw8M00K9S8yASTVF/
libHSSDL-gfx-0.6.0.1-6rhSP5mw8M00K9S8yASTVF-ghc7.10.2.so: undefined symbol:
SDL_initFramerate)

Notes:
* SDL works fine in all cases.
* My system is i386, using Arch Linux. I tried with another computer with
x86_64 with Arch Linux and it worked.
* It works if I compile it with ghc and run the executable.
* I installed the package using cabal install SDL-gfx with no errors.
* I installed the library in the OS just in case, and double checked that
it exist in /usr/lib/libSDL_gfx.so and that it contains the symbol
SDL_initFramerate.
* The long *.so library reported by runhaskell also constains
SDL_initFramerate.
* GHCi gives the same error (when executing main).
* I'm trying to make a cabal package that uses this library, and cabal gave
the same error within the sandbox.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151208/ca536e3a/attachment.html>


More information about the Beginners mailing list