[Haskell-cafe] Back on opengl win32 again? no window (more progress)

bbrown bbrown at botspiritcompany.com
Tue Oct 23 11:34:02 EDT 2007


On Mon, 22 Oct 2007 14:04:34 -0400, bbrown wrote
> Ok, sorry to bring this back up again.  I asked before and kind of 
> went to a working linux system.
> 
> My question;  On Win32, has anyone seen where you try to run the 
> application but the window will not stay open.  There are no errors, 
> the window with 3D objects will not stay open.  I was using a recent 
> haskell 6.6.1 (ghc-6.6.1- i386-windows.exe).
> 
> I asked before it seemed like the others suggested I use freeglut 
> and use that.  But I dont really need freeglut extensions.  I am 
> using basic opengl.  I noticed that opengl is included in the ghc 
> (mingw) I downloaded.  Also, the code compiles, just doesnt run. 
>  The machine itself is a 3.2ghz, nvidia machine (win2k).  I know 
> opengl code should work.
> 


Ok, I made a little bit more progress.  I was able to get the OpenGL source 
compiled, on a windows environment.  I was able to compile libHS* but now I 
don't know what exactly I should do with it.  I guess my next would be to 
actually link it to the haskell runtime. Hopefully this may help others.

Building stuff from the darcs/haskell repo:

Open cygwin, I am using a recent version (Download cyg Oct 20, 07).  I did 
have to install "autoconf tools" with the cygwin installer.

I am behind a firewall/proxy so I had to set this at the command line
export http_proxy=SOME_PROXY:9999

darcs get http://darcs.haskell.org/packages/OpenGL/

cd to that OpenGL directory. Here are the commands I invokved.

autoreconf
./configure
ghc --make Setup.hs

./Setup configure
./Setup build
./Setup build install

After everything was built, you should see the following output (towards the 
end). (from $ ./Setup build install)

Setup.exe: Warning: Unknown field 'build-type'
Preprocessing library OpenGL-2.2.1...
Building OpenGL-2.2.1...
/usr/bin/ar: creating dist\build\libHSOpenGL-2.2.1.a

Only bad thing, I don't really know what to do with libHSOpenGL-2.2.1.a. I 
guess I should have used "--prexix" at the configure command.  I avoided that 
because of the nature of cygwin paths.  Is there a manual way to copy what 
was output from this build.

Manually, I changed libHSOpenGL-2.2.1.a to libHSOpenGL.a and copied to my ghc 
runtime.  That didn't seem to do anything as I finally ran my application and 
got the same result.

Next?  I downloaded freeglut 2.4 and get compile errors.  I dont know I need 
to compile that or not.

--
Berlin Brown
[berlin dot brown at gmail dot com]
http://botspiritcompany.com/botlist/?



More information about the Haskell-Cafe mailing list