[HOpenGL] Win32 GHC cannot link GLUT

Manuel Garcia Rodriguez manueluniversidad at yahoo.es
Wed Dec 24 05:23:29 EST 2003


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 at 4'
H:/ghc/ghc-6.2/libHSGLUT.a(Registration__78.o)(.text+0x3ec):ghc10876.hc:
undefined reference to `glutGetWindow at 0'
H:/ghc/ghc-6.2/libHSGLUT.a(Window__10.o)(.text+0x63):ghc11416.hc:
undefined reference to `glutDisplayFunc at 4'
H:/ghc/ghc-6.2/libHSGLUT.a(Initialization__158.o)(.text+0x123):ghc16024.hc:
undefined reference to `glutInit at 8'
H:/ghc/ghc-6.2/libHSGLUT.a(Begin__2.o)(.text+0x54):ghc15656.hc:
undefined reference to `glutMainLoop at 0'
H:/ghc/ghc-6.2/libHSGLUT.a(Registration__38.o)(.text+0x69):ghc10876.hc:
undefined reference to `glutTimerFunc at 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
glasgow-haskell-bugs at haskell.org,
or http://sourceforge.net/projects/ghc/.

Thanks.


_______________________________________________________________
Yahoo! Sorteos
¡Ya puedes comprar Lotería de Navidad!
http://yahoo.ventura24.es/


More information about the HOpenGL mailing list