
I'm getting crashes from ghc-6.10.0.20081007 and ghc-6.11.20081024 when doing a very simple GLUT program (below) with OpenGL-2.2.1.1 and GLUT-2.1.1.2 (the latest from Hackage), running on WinXP. It works fine on ghc-6.9.20080622 . I'd appreciate hearing about other attempts with these versions on Windows systems. Thanks, - Conal import Graphics.UI.GLUT main :: IO () main = do putStrLn "Initializing" getArgsAndInitialize return ()

My setup worked:
- Windows XP.
- ghc-6.11.20081024
- freeglut 2.4.0
- darcs version of GLUT (with patched glutGetProcAddress [attached])
- darcs version of OpenGL
Getting freeglut going with ghc on windows is a bit involved. I could write
a walkthrough if there's enough interest.
David
2008/10/25 Conal Elliott
I'm getting crashes from ghc-6.10.0.20081007 and ghc-6.11.20081024 when doing a very simple GLUT program (below) with OpenGL-2.2.1.1 and GLUT-2.1.1.2 (the latest from Hackage), running on WinXP. It works fine on ghc-6.9.20080622 .
I'd appreciate hearing about other attempts with these versions on Windows systems.
Thanks, - Conal
import Graphics.UI.GLUT
main :: IO () main = do putStrLn "Initializing" getArgsAndInitialize return ()
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I'm interested; please write a wiki page about this.
Regards,
Henk-Jan van Tuyl
--
http://functor.bamikanarie.com
http://Van.Tuyl.eu/
--
On Tue, 28 Oct 2008 16:48:59 +0100, David Sankel
My setup worked:
- Windows XP. - ghc-6.11.20081024 - freeglut 2.4.0 - darcs version of GLUT (with patched glutGetProcAddress [attached]) - darcs version of OpenGL
Getting freeglut going with ghc on windows is a bit involved. I could write a walkthrough if there's enough interest.
David
2008/10/25 Conal Elliott
I'm getting crashes from ghc-6.10.0.20081007 and ghc-6.11.20081024 when doing a very simple GLUT program (below) with OpenGL-2.2.1.1 and GLUT-2.1.1.2 (the latest from Hackage), running on WinXP. It works fine on ghc-6.9.20080622 .
I'd appreciate hearing about other attempts with these versions on Windows systems.
Thanks, - Conal
import Graphics.UI.GLUT
main :: IO () main = do putStrLn "Initializing" getArgsAndInitialize return ()
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
--

Thanks, David. Helpful data point.
I am using glut32 rather than freeglut (and no need for patching the darcs
GLUT). I wonder if glut32-vs-freeglut could account for crash-vs-nocrash on
6.10 and 6.11 but not 6.9. I'd love to hear from someone on Windows and
glut32.
Please do post a wiki page on freeglut + ghc on windows and let us know
here.
Could you integrate your glutWin32 patch into the darcs GLUT?
- Conal
On Tue, Oct 28, 2008 at 8:48 AM, David Sankel
My setup worked:
- Windows XP. - ghc-6.11.20081024 - freeglut 2.4.0 - darcs version of GLUT (with patched glutGetProcAddress [attached]) - darcs version of OpenGL
Getting freeglut going with ghc on windows is a bit involved. I could write a walkthrough if there's enough interest.
David
2008/10/25 Conal Elliott
I'm getting crashes from ghc-6.10.0.20081007 and ghc-6.11.20081024 when doing a very simple GLUT program (below) with OpenGL-2.2.1.1 and GLUT-2.1.1.2 (the latest from Hackage), running on WinXP. It works fine on ghc-6.9.20080622 .
I'd appreciate hearing about other attempts with these versions on Windows systems.
Thanks, - Conal
import Graphics.UI.GLUT
main :: IO () main = do putStrLn "Initializing" getArgsAndInitialize return ()
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Conal Elliott wrote:
I am using glut32 rather than freeglut (and no need for patching the darcs GLUT). I wonder if glut32-vs-freeglut could account for crash-vs-nocrash on 6.10 and 6.11 but not 6.9. I'd love to hear from someone on Windows and glut32.
Windows XP with SP3 ghc-6.10.20081007 glut32 Works fine for me. Taking a look at my GL headers, I did have to mess with at least glut.h to get something to work---whether it was to build HOpenGL, to make programs linkable, or to make them runnable, I'm not sure. In any case, what I did was force GLUTAPIENTRY to be #defined as __stdcall.

Conal, are you using display lists at all? I've had problems with
allocating lists, but you seem to be able to leave off the allocation
step in Windows on nVidia cards so long as you're careful not to
conflict names yourself.
On Tue, Oct 28, 2008 at 4:03 PM, Matti Niemenmaa
Conal Elliott wrote:
I am using glut32 rather than freeglut (and no need for patching the darcs GLUT). I wonder if glut32-vs-freeglut could account for crash-vs-nocrash on 6.10 and 6.11 but not 6.9. I'd love to hear from someone on Windows and glut32.
Windows XP with SP3 ghc-6.10.20081007 glut32
Works fine for me.
Taking a look at my GL headers, I did have to mess with at least glut.h to get something to work---whether it was to build HOpenGL, to make programs linkable, or to make them runnable, I'm not sure. In any case, what I did was force GLUTAPIENTRY to be #defined as __stdcall.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- I try to take things like a crow; war and chaos don't always ruin a picnic, they just mean you have to be careful what you swallow. -- Jessica Edwards

No display lists. The crash happens during the GLUT call "initialize". I can trigger it from ghci with the following simple incantation: Prelude> import Graphics.UI.GLUT Prelude Graphics.UI.GLUT> initialize "foo" [] And no trouble under ghc 6.9.20080622. Stumped. :( - Conal On Tue, Oct 28, 2008 at 3:14 PM, Jefferson Heard < jefferson.r.heard@gmail.com> wrote:
Conal, are you using display lists at all? I've had problems with allocating lists, but you seem to be able to leave off the allocation step in Windows on nVidia cards so long as you're careful not to conflict names yourself.
Conal Elliott wrote:
I am using glut32 rather than freeglut (and no need for patching the darcs GLUT). I wonder if glut32-vs-freeglut could account for crash-vs-nocrash on 6.10 and 6.11 but not 6.9. I'd love to hear from someone on Windows and glut32.
Windows XP with SP3 ghc-6.10.20081007 glut32
Works fine for me.
Taking a look at my GL headers, I did have to mess with at least glut.h to get something to work---whether it was to build HOpenGL, to make programs
On Tue, Oct 28, 2008 at 4:03 PM, Matti Niemenmaa
> wrote: linkable, or to make them runnable, I'm not sure. In any case, what I did was force GLUTAPIENTRY to be #defined as __stdcall.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- I try to take things like a crow; war and chaos don't always ruin a picnic, they just mean you have to be careful what you swallow.
-- Jessica Edwards _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hi, Works here: Windows XP SP 3 ghc-6.10.20081007 glut32 from http://www.xmission.com/~nate/glut.html Don't know if this will help: DLLS loaded glut32.dll 0x10000000 0x38000 C:\WINDOWS\glut32.dll opengl32.dll 0x5ed00000 0xcc000 C:\WINDOWS\system32\opengl32.dll glu32.dll 0x68b20000 0x20000 C:\WINDOWS\system32\glu32.dll ddraw.dll 0x73760000 0x4b000 C:\WINDOWS\system32\ddraw.dll dciman32.dll 0x73bc0000 0x6000 C:\WINDOWS\system32\dciman32.dll msvcrt.dll 0x77c10000 0x58000 C:\WINDOWS\system32\msvcrt.dll advapi32.dll 0x77dd0000 0x9b000 C:\WINDOWS\system32\advapi32.dll rpcrt4.dll 0x77e70000 0x92000 C:\WINDOWS\system32\rpcrt4.dll gdi32.dll 0x77f10000 0x49000 C:\WINDOWS\system32\gdi32.dll secur32.dll 0x77fe0000 0x11000 C:\WINDOWS\system32\secur32.dll kernel32.dll 0x7c800000 0xf6000 C:\WINDOWS\system32\kernel32.dll ntdll.dll 0x7c900000 0xaf000 C:\WINDOWS\system32\ntdll.dll user32.dll 0x7e410000 0x91000 C:\WINDOWS\system32\user32.dll Some of the versions opengl32.dll OpenGL DLL (Microsoft) Version 5.01.2600.5512 glu32.dll OpenGL Utility Library DLL (Microsoft) Version 5.01.2600.5512 ddraw.dll - DirectDraw (Microsoft) 5.03.2600.5512 dciman32.dll - DCI Manage (Microsft) 5.01.2600.5512. glut32 had no version info. DirectX 9.0c (always thought OpenGL and DirectX were orthogonal but ddraw.dll is being used). Mark Conal Elliott wrote:
No display lists. The crash happens during the GLUT call "initialize". I can trigger it from ghci with the following simple incantation:
Prelude> import Graphics.UI.GLUT Prelude Graphics.UI.GLUT> initialize "foo" []
And no trouble under ghc 6.9.20080622.
Stumped. :(
- Conal
On Tue, Oct 28, 2008 at 3:14 PM, Jefferson Heard
mailto:jefferson.r.heard@gmail.com> wrote: Conal, are you using display lists at all? I've had problems with allocating lists, but you seem to be able to leave off the allocation step in Windows on nVidia cards so long as you're careful not to conflict names yourself.
On Tue, Oct 28, 2008 at 4:03 PM, Matti Niemenmaa
mailto:matti.niemenmaa%2Bnews@iki.fi> wrote: > Conal Elliott wrote: >> I am using glut32 rather than freeglut (and no need for patching the darcs >> GLUT). I wonder if glut32-vs-freeglut could account for crash-vs-nocrash on >> 6.10 and 6.11 but not 6.9. I'd love to hear from someone on Windows and >> glut32. > > Windows XP with SP3 > ghc-6.10.20081007 > glut32 > > Works fine for me. > > Taking a look at my GL headers, I did have to mess with at least glut.h to get > something to work---whether it was to build HOpenGL, to make programs linkable, > or to make them runnable, I'm not sure. In any case, what I did was force > GLUTAPIENTRY to be #defined as __stdcall. > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org mailto:Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- I try to take things like a crow; war and chaos don't always ruin a picnic, they just mean you have to be careful what you swallow.
-- Jessica Edwards _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org mailto:Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
------------------------------------------------------------------------
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Conal, I tried this today on a VirtualBox VM running the same versions
as Mark Wassell, and it worked for me... I wonder, though, if perhaps
GLUT is not getting a GLX (or direct) video context on your machine
for some reason. That has caused some of my GLUT programs to die in
the past, no matter the language. Have you tried using the GLUT
library from a C program to see if you get the same error?
On Wed, Oct 29, 2008 at 4:49 AM, Mark Wassell
Hi,
Works here:
Windows XP SP 3 ghc-6.10.20081007 glut32 from http://www.xmission.com/~nate/glut.html
Don't know if this will help:
DLLS loaded
glut32.dll 0x10000000 0x38000 C:\WINDOWS\glut32.dll opengl32.dll 0x5ed00000 0xcc000 C:\WINDOWS\system32\opengl32.dll glu32.dll 0x68b20000 0x20000 C:\WINDOWS\system32\glu32.dll ddraw.dll 0x73760000 0x4b000 C:\WINDOWS\system32\ddraw.dll dciman32.dll 0x73bc0000 0x6000 C:\WINDOWS\system32\dciman32.dll msvcrt.dll 0x77c10000 0x58000 C:\WINDOWS\system32\msvcrt.dll advapi32.dll 0x77dd0000 0x9b000 C:\WINDOWS\system32\advapi32.dll rpcrt4.dll 0x77e70000 0x92000 C:\WINDOWS\system32\rpcrt4.dll gdi32.dll 0x77f10000 0x49000 C:\WINDOWS\system32\gdi32.dll secur32.dll 0x77fe0000 0x11000 C:\WINDOWS\system32\secur32.dll kernel32.dll 0x7c800000 0xf6000 C:\WINDOWS\system32\kernel32.dll ntdll.dll 0x7c900000 0xaf000 C:\WINDOWS\system32\ntdll.dll user32.dll 0x7e410000 0x91000 C:\WINDOWS\system32\user32.dll
Some of the versions
opengl32.dll OpenGL DLL (Microsoft) Version 5.01.2600.5512 glu32.dll OpenGL Utility Library DLL (Microsoft) Version 5.01.2600.5512 ddraw.dll - DirectDraw (Microsoft) 5.03.2600.5512 dciman32.dll - DCI Manage (Microsft) 5.01.2600.5512. glut32 had no version info.
DirectX 9.0c (always thought OpenGL and DirectX were orthogonal but ddraw.dll is being used).
Mark
Conal Elliott wrote:
No display lists. The crash happens during the GLUT call "initialize". I can trigger it from ghci with the following simple incantation:
Prelude> import Graphics.UI.GLUT Prelude Graphics.UI.GLUT> initialize "foo" []
And no trouble under ghc 6.9.20080622.
Stumped. :(
- Conal
On Tue, Oct 28, 2008 at 3:14 PM, Jefferson Heard
mailto:jefferson.r.heard@gmail.com> wrote: Conal, are you using display lists at all? I've had problems with allocating lists, but you seem to be able to leave off the allocation step in Windows on nVidia cards so long as you're careful not to conflict names yourself.
Conal Elliott wrote:
I am using glut32 rather than freeglut (and no need for
GLUT). I wonder if glut32-vs-freeglut could account for crash-vs-nocrash on 6.10 and 6.11 but not 6.9. I'd love to hear from someone on Windows and glut32.
Windows XP with SP3 ghc-6.10.20081007 glut32
Works fine for me.
Taking a look at my GL headers, I did have to mess with at least glut.h to get something to work---whether it was to build HOpenGL, to make
On Tue, Oct 28, 2008 at 4:03 PM, Matti Niemenmaa
mailto:matti.niemenmaa%2Bnews@iki.fi> wrote: patching the darcs programs linkable, or to make them runnable, I'm not sure. In any case, what I did was force GLUTAPIENTRY to be #defined as __stdcall.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org mailto:Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- I try to take things like a crow; war and chaos don't always ruin a picnic, they just mean you have to be careful what you swallow.
-- Jessica Edwards _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org mailto:Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
------------------------------------------------------------------------
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- I try to take things like a crow; war and chaos don't always ruin a picnic, they just mean you have to be careful what you swallow. -- Jessica Edwards

With ghc 6.10.1, the patches aren't necessary for the lasted releases of the
bindings. I've put a walkthrough on my blog for the process of getting
`freeglut+GLUT binding+GL binding+ghc 6.10.1` up and running.
http://netsuperbrain.com/blog/
David
On Tue, Oct 28, 2008 at 10:48 AM, David Sankel
My setup worked:
- Windows XP. - ghc-6.11.20081024 - freeglut 2.4.0 - darcs version of GLUT (with patched glutGetProcAddress [attached]) - darcs version of OpenGL
Getting freeglut going with ghc on windows is a bit involved. I could write a walkthrough if there's enough interest.
David
2008/10/25 Conal Elliott
I'm getting crashes from ghc-6.10.0.20081007 and ghc-6.11.20081024 when doing a very simple GLUT program (below) with OpenGL-2.2.1.1 and GLUT-2.1.1.2 (the latest from Hackage), running on WinXP. It works fine on ghc-6.9.20080622 .
I'd appreciate hearing about other attempts with these versions on Windows systems.
Thanks, - Conal
import Graphics.UI.GLUT
main :: IO () main = do putStrLn "Initializing" getArgsAndInitialize return ()
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (6)
-
Conal Elliott
-
David Sankel
-
Henk-Jan van Tuyl
-
Jefferson Heard
-
Mark Wassell
-
Matti Niemenmaa