compiling problem on Sven's tutorial sample

Shiqi Cao <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
Hi 

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


root@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@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
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.