Re: Installation (ok!), but ...

"Claus Reinke" <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <00f401c54f47$ec7e4e20$7b987ad5@vaio>
>1. You have to tell ghc, that you want the HOpenGl Package when you compile 
>some stuff that needs HOpenGL. You can do this with

in addition to the graphics (-package OpenGL), you also need some GUI,
most likely GLUT (-package GLUT), if you're compiling red book examples.

"ghc-pkg list" for ghc 6.4 should list "OpenGL-2.0, GLUT-2.0". as has been
pointed out already, these differ substantially from the early tarballs.

if you do "ghc-pkg describe GLUT", you'll see that the GLUT package
depends on the OpenGL package, so it is sufficient to specify "-package
GLUT" on the command line to get both.

even easier is to use "ghc --make", as that will now infer the packages 
that provide the modules you import, so you don't need to specify either
of GLUT/OpenGL explicitly on the command line. something like the 
following should work for the red book examples:

ghc --make <example>.hs -o <example>

you can find out what packages are installed and how to get access to
them here:

http://www.haskell.org/ghc/docs/latest/html/users_guide/packages.html

and the documentation for the OpenGL and GLUT packages is here:

http://www.haskell.org/ghc/docs/latest/html/libraries/index.html

cheers,
claus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.