Win32 GHC cannot link GLUT

Manuel Garcia Rodriguez <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
Hi.

I've installed GHC 6.2, but trying to compile a simple
HelloWindow.hs program fails. The same code runs with
Hugs. Both installs are lastest .msi

import Graphics.UI.GLUT
import Graphics.Rendering.OpenGL

main = do
  getArgsAndInitialize
  createAWindow "Hello Window"
  mainLoop

createAWindow windowName = do
  createWindow windowName
  displayCallback $= clear [ColorBuffer]

H:\Documents and Settings\manuel>ghc -package GLUT -o
HelloWindow HelloWindow.hs
compilation IS NOT required
H:/ghc/ghc-6.2/libHSGLUT.a(Window__53.o)(.text+0x85):ghc14736.hc:
undefined reference to `glutCreateWindow@4'
H:/ghc/ghc-6.2/libHSGLUT.a(Registration__78.o)(.text+0x3ec):ghc10876.hc:
undefined reference to `glutGetWindow@0'
H:/ghc/ghc-6.2/libHSGLUT.a(Window__10.o)(.text+0x63):ghc11416.hc:
undefined reference to `glutDisplayFunc@4'
H:/ghc/ghc-6.2/libHSGLUT.a(Initialization__158.o)(.text+0x123):ghc16024.hc:
undefined reference to `glutInit@8'
H:/ghc/ghc-6.2/libHSGLUT.a(Begin__2.o)(.text+0x54):ghc15656.hc:
undefined reference to `glutMainLoop@0'
H:/ghc/ghc-6.2/libHSGLUT.a(Registration__38.o)(.text+0x69):ghc10876.hc:
undefined reference to `glutTimerFunc@12'

H:\Documents and Settings\manuel>ghci HelloWindow.hs
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version
6.2, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.
Skipping  Main             ( HelloWindow.hs,
HelloWindow.o )
Ok, modules loaded: Main.
Prelude Main> main
Loading package OpenGL ... linking ... done.
Loading package GLUT ... linking ...
H:/ghc/ghc-6.2/HSGLUT.o: unknown symbol
`_glutMainLoop'
ghc.exe: panic! (the `impossible' happened, GHC
version 6.2):
        can't load package `GLUT'

Please report it as a compiler bug to
[email protected],
or http://sourceforge.net/projects/ghc/.

Thanks.


_______________________________________________________________
Yahoo! Sorteos
¡Ya puedes comprar Lotería de Navidad!
http://yahoo.ventura24.es/
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.