[HOpenGL] Installation (ok!), but ...
Patrick Scheibe
mai99dnn at studserv.uni-leipzig.de
Tue May 3 11:14:10 EDT 2005
Ok,
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
createWindow progName
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
glut library.
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:
/usr/lib/libMesaGLU.so.3
/usr/lib/libMesaGL.a
/usr/lib/libGLU.la
/usr/lib/libGLU.so
/usr/lib/libMesaGL.la
/usr/lib/libMesaGL.so
/usr/lib/libGLU.so.1
/usr/lib/libGL.la
/usr/lib/libGL.so
/usr/lib/libGLU.a
/usr/lib/libglut.a
/usr/lib/libglut.so.3
/usr/lib/libglut.la
/usr/lib/libglut.so
Good luck
Patrick
More information about the HOpenGL
mailing list