
Hi,
now, I had this problem :(((((
[root@PANDORA ~]# ghc --make Planet.hs
Chasing modules from: Planet.hs
Skipping Main ( Planet.hs, Planet.o )
Linking ...
/usr/bin/ld: cannot find -lglut
collect2: ld returned 1 exit status
Thanks,
Sandra
Patrick Scheibe
Hi,
I installed GHC 6.4, but I don´t know how to running a program, like Planet.hs. I had this problem:
[root@medusaLinux redbook_HS]# ghc Planet.hs -v Glasgow Haskell Compiler, Version 6.4, for Haskell 98, compiled by GHC version 5.04.3 Using package config file: /usr/local/lib/ghc-6.4/package.conf Hsc static flags: -static *** Checking old interface for Main: *** Parser: *** Renamer/typechecker: Planet.hs:15:0: Failed to load interface for `GL': Could not find module ` GL': locations searched: GL.hi GL.hi-boot *** Deleting temp files Deleting: /tmp/ghc3765.s Warning: deleting non-existent /tmp/ghc3765.s
Thanks, Sandra
Lemmih wrote:
On 4/28/05, Sandra Fontes wrote:
Hi,
At installation of HOpenGL, I had this problem:
[snip]
HOpenGL is not a stand-alone package any more. Just install GHC 6.4 and it'll be there.
--------------------------------- Yahoo! Acesso Grátis: Internet rápida e grátis. Instale o discador agora!

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
participants (2)
-
Patrick Scheibe
-
Sandra Fontes