[HOpenGL] Installation (ok!), but ...
mai99dnn at studserv.uni-leipzig.de
Tue May 3 11:14:10 EDT 2005
It seems you are a really newbie. It is hard to understand such problems when
you never did something in OpenGL. A short summery:
OpenGl is only the graphic engine providing you with fast drawing operations,
textures, polygons, affine transformations, ...
If you want to programm some graphical thing using OpenGl, then you have to
ensure that the libraries you want to use are on your machine. That means
anywhere, in a reachable path has to lie a libgl.
BUT that is in most cases not enough, because you (or the Planet.hs sample)
need(s) to open a window, where you(it) have(has) to draw in.
A very simple way is to use the GLUT library. With the functions of this
library you can simple open a window and use it for your graphics:
(progName, _args) <- getArgsAndInitialize
initialDisplayMode $= [ DoubleBuffered, RGBMode ]
initialWindowSize $= Size 500 500
initialWindowPosition $= Position 100 100
All HOpenGl haskell things use the c-libraries. When you compile a
HOpenGl-prog and you don't have the underlying c-libs then this happens:
> Linking ...
> /usr/bin/ld: cannot find -lglut
> collect2: ld returned 1 exit status
because the linker, putting all things finaly together can't find the needed
You should ensure that you have following things on your machine:
the gl library
the glu lib
and the glut lib
on my suse box they are here:
More information about the HOpenGL