-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Windows 10] Build error: conflicting types for SDL_main #7
Comments
@Crysikrend Can you try replacing We ran into the same problem with SDL2 and SDL2-ttf before [1] [2]. It might just be a matter of doing the same changes for SDL2-image. Feel free to open a pull request if you're successful. [1] haskell-game/sdl2@bc30282 Also, passing the ball to @sbidin, this is very much so related to #6 (comment) about the name change for that constant and it would be nice to update Hackage/Stackage after, so that people no longer run into this. Cheers (: |
It builds! But I'll post some warnings that this produces here so that someone can make sense of them (I'm still just a beginner with all this so excuse me). λ stack build
sdl2-image-2.0.0: configure (lib)
Configuring sdl2-image-2.0.0...
sdl2-image-2.0.0: build (lib)
Preprocessing library for sdl2-image-2.0.0..
Building library for sdl2-image-2.0.0..
[1 of 3] Compiling SDL.Raw.Helper ( src\SDL\Raw\Helper.hs, .stack-work\dist\7d103d30\build\SDL\Raw\Helper.o )
[2 of 3] Compiling SDL.Raw.Image ( .stack-work\dist\7d103d30\build\SDL\Raw\Image.hs, .stack-work\dist\7d103d30\build\SDL\Raw\Image.o )
src\SDL\Raw\Image.hsc:85:1: warning: [-Wmissing-pattern-synonym-signatures]
Pattern synonym with no type signature:
pattern IMG_INIT_JPG :: forall a. (Eq a, Num a) => a
|
85 | pattern IMG_INIT_JPG = #{const IMG_INIT_JPG}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
src\SDL\Raw\Image.hsc:86:1: warning: [-Wmissing-pattern-synonym-signatures]
Pattern synonym with no type signature:
pattern IMG_INIT_PNG :: forall a. (Eq a, Num a) => a
|
86 | pattern IMG_INIT_PNG = #{const IMG_INIT_PNG}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
src\SDL\Raw\Image.hsc:87:1: warning: [-Wmissing-pattern-synonym-signatures]
Pattern synonym with no type signature:
pattern IMG_INIT_TIF :: forall a. (Eq a, Num a) => a
|
87 | pattern IMG_INIT_TIF = #{const IMG_INIT_TIF}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
src\SDL\Raw\Image.hsc:88:1: warning: [-Wmissing-pattern-synonym-signatures]
Pattern synonym with no type signature:
pattern IMG_INIT_WEBP :: forall a. (Eq a, Num a) => a
|
88 | pattern IMG_INIT_WEBP = #{const IMG_INIT_WEBP}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
[3 of 3] Compiling SDL.Image ( src\SDL\Image.hs, .stack-work\dist\7d103d30\build\SDL\Image.o )
ignoring (possibly broken) abi-depends field for packages
sdl2-image-2.0.0: copy/register |
Ashley, Alex, thanks for the fix! As for the warnings, they can be hidden the same way as in haskell-game/sdl2-ttf#7 and I don't believe they're a serious issue. Please reopen if not the case. |
As the title says, trying to do
stack install sdl2-image
.I uninstalled Stack from my Windows machine to try and build this using this guide. I also installed sdl2-image with:
λ stack exec -- pacman --noconfirm -S mingw-w64-x86_64-SDL2_gfx mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-SDL2_ttf
I don't know how often people are using SDL2-image, or if they're just using it on something other than Windows, but without smooth compilations on Windows people aren't going to take gamedev with Haskell seriously, so let me know if there's any data you need me to gather as I've read you don't have access to a Windows machine yourself. I really want this to work as I can't really work on my Haskell game too much until I know there's a way of building it on Windows.
Thanks!
The text was updated successfully, but these errors were encountered: