Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling load causes the program to do nothing. (Windows, Stack) #11

Open
sullyj3 opened this issue Nov 21, 2019 · 4 comments
Open

Calling load causes the program to do nothing. (Windows, Stack) #11

sullyj3 opened this issue Nov 21, 2019 · 4 comments

Comments

@sullyj3
Copy link

sullyj3 commented Nov 21, 2019

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
Copy link

xstater commented May 14, 2020

add -optl-mconsole in ghc-mconsole maybe useful

@xstater
Copy link

xstater commented May 14, 2020

add -optl-mconsole in ghc-mconsole maybe useful

oops ,its ghc-options

@omegaGreeNya
Copy link

Same strugling. Even without calling load, calling initialize is enough.

@omegaGreeNya
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants