[HOpenGL] OpenGL and GLUT packages on Windows cause undefeined
reference problem if build theirs myself
shelarcy
shelarcy at gmail.com
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...
(snip)
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
(snip)
dist\build\Graphics\UI\GLUT\Callbacks\Registration_stub.o
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.
http://www.haskell.org/pipermail/hopengl/2006-December/000680.html
And same problem cause if build GHC head snapshot myself, too.
C:\home\ghc-6.7.20070305\libraries\GLUT\examples\OrangeBook\ogl2brick>C:\home\gh
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 ...
C:/home/ghc-6.7.20070305/ghc-6.7.20070305/libHSGLUT.a(Extensions__3.o)(.text+0x1
4):fake: undefined reference to `hs_GLUT_getProcAddress at 4'
C:/home/ghc-6.7.20070305/ghc-6.7.20070305/libHSOpenGL.a(Extensions__3.o)(.text+0
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 ...
http://www.haskell.org/ghc/dist/current/dist/
http://www.haskell.org/pipermail/cvs-ghc/2007-March/034396.html
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 capella.freemail.ne.jp>
http://page.freett.com/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 : http://www.haskell.org/pipermail/hopengl/attachments/20070309/5f369a53/opengl_fix_getProcAddress-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glut_fix_getProcAddress.dpatch
Type: application/octet-stream
Size: 3085 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/hopengl/attachments/20070309/5f369a53/glut_fix_getProcAddress-0001.obj
More information about the HOpenGL
mailing list