OpenGL and GLUT packages on Windows cause undefeined reference problem if build theirs myself

shelarcy shelarcy at
Fri Mar 9 01:28:46 EST 2007

Hello all,

I tried to build OpenGL and GLUT packages on Windows by myself.
Then runhaskell Setup.hs build cause below problem.

$ runhaskell Setup.hs build
Reading parameters from c:\home\ghc-6.7.20070305\libraries\GLUT\GLUT.buildinfo
Preprocessing library GLUT-2.1...
Building GLUT-2.1...
c:\home\ghc-6.7.20070305\ghc-6.7.20070305\bin\ar.exe q dist\build\libHSGLUT-2.1.a dist\build\Graphics\UI\GLUT.o d
Warning: resolving _hs_GLUT_getProcAddress at 4 by linking to _hs_GLUT_getProcAddress
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups

This problem is already noticed by Pepe Gallardo.

And same problem cause if build GHC head snapshot myself, too.

c-6.7.20070305\ghc-6.7.20070305\bin\ghc.exe --make Brick.hs
[1 of 1] Compiling Main             ( Brick.hs, Brick.o )
Linking Brick.exe ...
4):fake: undefined reference to `hs_GLUT_getProcAddress at 4'
x14):fake: undefined reference to `hs_OpenGL_getProcAddress at 4'
collect2: ld returned 1 exit status

This problem doesn't occure Sigbjorn Finne's build snapshot ...

I don't know why .. but I know why reference is unresolved.

CALLCONV is defined stdcall on Windows, but hs_**_getProcAddress
(and other cbits's c functions) are build with ccall convention.

Attached are darcs patch to fix these problem.
But ... I don't know this patch doesn't cause any ptoblem Sigbjorn's
next binary release. Because I don't know why OpenGL and GLUT can
build correctly under his environment.

Best Regars,

shelarcy <shelarcy>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opengl_fix_getProcAddress.dpatch
Type: application/octet-stream
Size: 3692 bytes
Desc: not available
Url :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glut_fix_getProcAddress.dpatch
Type: application/octet-stream
Size: 3085 bytes
Desc: not available
Url :

More information about the Libraries mailing list