Calling load causes the program to do nothing. (Windows, Stack)
sullyj3 opened this issue · 4 comments
sullyj3 commented
The following program has no output:
module Main where
import SDL.Image
main :: IO ()
main = do
putStrLn "hello world"
f <- load "guy.png"
putStrLn $ seq f "f loaded"
Commenting out the last two lines gives the expected output "hello world".
On Windows with stack, in stack.yaml
:
extra-deps:
- git: https://github.com/haskell-game/sdl2-image.git
commit: 382395c763b473032721c71921b5c9241142178f
xstater commented
add -optl-mconsole in ghc-mconsole maybe useful
xstater commented
add -optl-mconsole in ghc-mconsole maybe useful
oops ,its ghc-options
omegaGreeNya commented
Same strugling. Even without calling load, calling initialize
is enough.
omegaGreeNya commented
Yo, fixed all problems with using sdl2-image functions, by adding SDL_image windows binaries into project catalog.
Runtime Binaries: https://www.libsdl.org/projects/SDL_image/
Hope, it's helps someone too!