Re: [Haskell-cafe] OpenGL Linking Issue

Hi Mark,
From what I remember -- I haven't used OpenGL for about a year -- you need something like
ghc --make -package GLUT -lglut Test1.hs
assuming that you have both HOpenGL haskell package and OpenGL c library.
Cheers,
Sean
2009/3/18 Mark Spezzano
Hi,
I hope I’m posting to the right forum.
I’ve got OpenGL up and running on my Windows Vista machine (finally!) and it runs perfectly well under Eclipse, bringing up a window with a rendered image as expected.
The only issue starts when I try to compile the program without Eclipse (using GHC rather than GHCi like Eclipse does).
I type:
C:\Users\Mark\workspace2\OpenGLPractice\src>ghc --make Test1.hs
And get the following output
Linking Test1.exe ...
C:\Program Files\Haskell\GLUT-2.1.1.2\ghc-6.10.1/libHSGLUT-2.1.1.2.a(Extensions.
o):fake:(.text+0xcc): undefined reference to `glutGetProcAddress@4'
collect2: ld returned 1 exit status
What’s happening here? Obviously it’s a linking issue, but I was wondering whether I need to include some library or file or option to ghc so that it links correctly.
Cheers,
Mark Spezzano
No virus found in this outgoing message. Checked by AVG. Version: 7.5.557 / Virus Database: 270.11.18/2008 - Release Date: 17/03/2009 4:25 PM
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Sean Lee PhD Student Programming Language and Systems Research Group School of Computer Science and Engineering University of New South Wales
participants (1)
-
Sean Lee