[HOpenGL] compiling problem on Sven's tutorial sample

Shiqi Cao caos2 at mcmaster.ca
Wed May 26 22:33:37 EDT 2004


Hi 

I tried to compile the sample code in Sven's tutorial. 


root at linux Haskell # ghc -package GLUT -o test3 test3.o
/usr/lib/ghc-6.2/libHSrts.a(Main.o)(.text+0x10): In function `main':
: undefined reference to `__stginit_ZCMain'
/usr/lib/ghc-6.2/libHSrts.a(Main.o)(.text+0x36): In function `main':
: undefined reference to `ZCMain_main_closure'
collect2: ld returned 1 exit status
root at linux Haskell #


module GLtest where

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

main = do
  getArgsAndInitialize
  createAWindow "Hello Window"
  mainLoop

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


I don't what's wrong.


Shiqi Cao



More information about the HOpenGL mailing list