[Haskell-beginners] compilation joys
Elise Huard
haskell at elisehuard.be
Thu May 29 15:31:16 UTC 2014
Hi,
I've been compiling this project https://github.com/mlesniak/game.git
It uses Hipmunk (2D collision detection/physics framework) and OpenGL.
Now the problem is that Hipmunk uses Data.StateVar, and OpenGL/GLUT
use Graphics.Rendering.OpenGL.GL.StateVar
Both have pretty much the same code and functionality, but using both
together gives problems with conflicting types.
My current solution was to locally fork Hipmunk and make it use
Graphics.Rendering.OpenGL.GL.StateVar (because the other way round -
making OpenGL use Data.StateVar, is a cascading nightmare, lots of
libs to patch), and this works.
My question: is this the only possible solution? Is there some way
that doesn't involve patching one library or the other?
The other thing I had to locally patch is to force cabal to use
freeglut instead of the local Mac OS X GLUT. I did this by again,
locally forking GLUT (long live cabal sandbox add-source!) and adding
extra-lib-dirs: /usr/local/Cellar/freeglut/2.8.1/lib
which is the local homebrew freeglut dir.
Is there a better, more reproducible way to do this?
Thank you,
Elise
More information about the Beginners
mailing list