-
Notifications
You must be signed in to change notification settings - Fork 85
GHC 8.0.2 on Windows "error: conflicting types for 'SDL_main'" workaround #139
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
Comments
Fantastic. I just ran into this problem this weekend, and I'm really glad to see that someone found a workaround. Testing it now. |
Any progress on this? |
@codeweaverx Did your testing show this was what you needed? |
Tested just now on Windows 7, stack 1.4, lts-8.12 (GHC 8.0.2): Successful build of the lib and the examples with the |
yep, the workaround also works on appveyor: http://ci.appveyor.com/project/Mikolaj/lambdahack/build/1.0.12 |
This was fixed in #142, right? |
Looks like it, can always re-open if we got that wrong! |
BTW, if nobody reopens in a few days, could we release a new version on Hackage? Then I could simplify appveyor's and users' instructions for compiling my project. Thanks! |
That sounds perfectly reasonable to me. |
@haskell-game: would now be a good time for a new release? Perhaps also with a test that it works with the official GHC 8.2.1? Did anybody test that already? If not, I can volunteer. |
@Mikolaj My application works fine with sdl2-2.2.0 and GHC 8.2.1 |
@nickkuk: thank you. I've just compiled on 8.2.1 with
and all the examples compile and do something (not sure if they do the right thing, but nothing looks out of order, except the joystick example, which rightly complains that I have no joystick). |
I want to get all open PRs merged first, as there are breaking changes. I
think it's also worth supporting a new sdl2 at the same time
…On Mon, 31 Jul 2017, 12:38 pm Mikolaj Konarski, ***@***.***> wrote:
@nickkuk <http://github.com/nickkuk>: thank you. I've just compiled on
8.2.1 with
cabal install --disable-library-profiling --disable-profiling -j1 -fno-linear -fexamples -fopengl-example
and all the examples compile and do something (not sure if they do the
right thing, but nothing looks out of order, except the joystick example,
which rightly complains that I have no joystick).
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#139 (comment)>,
or mute the thread
<http://github.com/notifications/unsubscribe-auth/AABRjh1SGsoX66b9NEvEJ1SUsdXsJ0Eiks5sTbycgaJpZM4L_DDo>
.
|
@ocharles: I've finally managed to install new libsdl2-dev and libsd2-ttf-dev on the hackage docs building server. Could you restart doc building so that we can see if it works? Thanks! |
Or anybody from @haskell-game: ^^^. BTW, thanks for the sdl2 release! |
OK, never mind, the sdl2 packages I installed are too old, because the Ubuntu installation is too old. Too bad. :( |
Does not work on windows 10. I still have this problem on sdl2 2.3.0. |
@Supernerd11 can you provide any type of reproducible example and the output you get? |
@ocharles
and cloning the repo and doing
Is this what you meant? |
Hopefully some of the Window's-using devs can shed some light on this. |
@Supernerd11 I can't reproduce this on an up to date 64-bit Windows 10 box, the following builds correctly:
|
How did you install SDL2? I've tried reinstalling it now, and it didn't help. I still get the same message. |
@Supernerd11 I followed http://www.reddit.com/r/haskellgamedev/comments/4jpthu/windows_sdl2_is_now_almost_painless_via_stack/ originally, so it should be |
I'm gonna try to reinstall stack to ser if this continues. |
I have reinstalled stack, and everything. It still gave the same error. |
I managed to fix it by changing |
Maybe we should add that |
I think the problem is me using the wrong version of SDL2. I have 2.0.6, and they might have changed it then... Anyway, it compiles but doesn't actually run, so this didn't get me far. |
Actually, it works now... I don't know why, but it does. |
This morning I ran into this problem on a fresh install of Windows 10. I've fixed it by adding |
I've run into this trying to build http://github.com/jxv/dino-rush on windows 7 64 bit |
This issue is because of the older sdl version this project depends on, right? |
As @cronokirby , I'm running into the exactly same issue when trying to build http://github.com/jxv/dino-rush repository.
|
@cronokirby It can't be built for |
@jxv dino rush love notification :) |
whoever stumbles upon it like me: you actually want |
cpp-options: -D_SDL_main_h
needs to be added to the.cabal
file to compile on Windows with GHC 8.0.2 (credits to <RyanGlScott> in #ghc http://ircbrowse.net/day/ghc/2017/01/28)It looks like this is technically a problem with the hsc2hs implementation (see above irc discussion) so this isn't necessarily an issue with sdl2 itself, but if this cpp flag doesn't cause any other issues I can make a patch for it
The text was updated successfully, but these errors were encountered: