[Haskell-cafe] Linker errors to OpenGL with GHC 6.10.1

Greg Fitzgerald garious at gmail.com
Wed Nov 12 19:52:06 EST 2008


Do you know how I can fix these linker errors?

C:\projects\fun>cat HelloWorld.hs

import Graphics.Rendering.OpenGL
import Graphics.UI.GLUT
main = do
  (progname, _) <- getArgsAndInitialize
  createWindow "Hello World"
  displayCallback $= clear [ColorBuffer]
  mainLoop

C:\projects\fun>ls lib
GlU32.Lib
glut32.lib
OpenGL32.Lib
glut.def
glut32.dll

C:\projects\fun>ghc -Llib -lglut32 -lglu32 -lopengl32 HelloWorld.hs --make
Linking HelloWorld.exe ...
C:\Program
Files\Haskell\GLUT-2.1.1.2\ghc-6.10.1/libHSGLUT-2.1.1.2.a(Begin.o):fake:(.text+0x1cb):
undefined reference to `glutGet'
C:\Program
Files\Haskell\GLUT-2.1.1.2\ghc-6.10.1/libHSGLUT-2.1.1.2.a(Begin.o):fake:(.text+0x8af):
undefined reference to `glutMainLoop'
C:\Program
Files\Haskell\GLUT-2.1.1.2\ghc-6.10.1/libHSGLUT-2.1.1.2.a(Window.o):fake:(.text+0x3cd):
undefined reference to `glutEntryFunc'
C:\Program
Files\Haskell\GLUT-2.1.1.2\ghc-6.10.1/libHSGLUT-2.1.1.2.a(Window.o):fake:(.text+0x40d):
undefined reference to `glutVisibilityFunc'
C:\Program
Files\Haskell\GLUT-2.1.1.2\ghc-6.10.1/libHSGLUT-2.1.1.2.a(Window.o):fake:(.text+0x3595):
undefined reference to `glutPassiveMotionFunc'
...hundreds more...


Thanks,
Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081112/2bf3bb5a/attachment.htm


More information about the Haskell-Cafe mailing list