Compiling the Haskell OpenGL/GLUT bindings on Windows is unfortunately very complicated,
because they use some Unix tools. It is recommended to use the Haskell Platform instead,
which as you noticed, has them included. If for some reasons you need to compile them manually,
the primary trick is to install a (recent version!) of MinGW/MSys, which provides the necessary
I have more experience with GLUT than with GLFW, so I can add that GLUT works pretty
robustly too (I use Windows and OSX), even though it clearly shows the age. The only big
problem I remember is with the middle mouse buttons; and there is some inconvenience
with the initialization, and lack of vsync support (which has to be hacked in). However,
it provides a display callback, which as far as I remember, GLFW does not (it only has
a big loop).
As Jason said, to use GLUT, you need to put glut32.dll at a place where Windows finds it
(either at the same directory your executable is - recommended if you distribute your app -,
or some Windows system directory).
Also, with GHCi there are some issues, so first try the compiled version. I'm not up-to-date
regarding how to solve these issues.
OpenGL/GLUT is much simpler than wxHaskell. I had very bad experiences with wxHaskell
(though I believe they were primarily caused by wx itself), but that was some time ago, so it
is possible that it is better now.
Hope this helps,
On Sun, May 6, 2012 at 10:34 PM, ai00rea <black_fury91 <at> yahoo.com>
I have to make a project for university. I want to make a little game like
Pong. For this I decided to use Glut. I followed this tutorial but I didn't
I am using Windows 7. Now I removed all things I installed from my computer
about haskell & openGL & GLUT.
And I installed Haskell Platform. I found out that openGL and GLUT are
included in this platform. OK but there is one problem:
GHCi, version 7.0.4: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
[1 of 1] Compiling Main (
Ok, modules loaded: Main.
Loading package OpenGL-188.8.131.52 ... linking ... done.
Loading package array-0.3.0.2 ... linking ... done.
Loading package containers-0.4.0.0 ... linking ... done.
Loading package GLUT-184.108.40.206 ... <interactive>: glut32: The specified module
ld not be found.
can't load .so/.DLL for: glut32 (addDLL: could not load DLL)
Please help me. I tried 2 days to install this. Before that I tried to
instal WXHaskell too, and i failed. Or recomand me an library that you use
and there are some examples of code to figure out how to use it and is good
for my purpose: Pong.
View this message in context: http://haskell.1045720.n5.nabble.com/Problem-with-Glut-tp5689667.html
Sent from the Haskell - HOpenGL mailing list archive at Nabble.com.
HOpenGL mailing list
HOpenGL <at> haskell.org