[Haskell-cafe] SDL and ALUT on Windows: "stdin Bad file descriptor"

Brandon Allbery allbery.b at gmail.com
Sat Jan 26 21:52:03 CET 2013


On Sat, Jan 26, 2013 at 3:34 PM, Thiago Negri <evohunz at gmail.com> wrote:

> I'm trying SDL on Windows, and things are getting really weird.
> I can compile the code (links on the end).
> When I run it, if I try using `stdin` the program crashes with this
> message:
>
> <stdin>: hGetLine: invalid argument (Bad file descriptor)
>

You haven't even touched SDL at that point in that source code.

If I had to guess, something (possibly a linker option embedded in the SDL
binding) is causing your program to be built as a Windows GUI (as opposed
to Windows Console) so it has no stdin.  I couldn't tell you much more than
that, though; the ways of Windows development are foreign to me.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130126/7d83e74e/attachment.htm>


More information about the Haskell-Cafe mailing list