当您包含导入Gloss的项目时,`stack ghci`会失败 [英] `stack ghci` fails when you include a project which imports Gloss
本文介绍了当您包含导入Gloss的项目时,`stack ghci`会失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果您在Stack项目中导入Gloss并使用 stack ghci
,则会出现以下错误:
If you import Gloss within a Stack project and use stack ghci
, you get the following error:
GHCi, version 7.10.2: http://www.haskell.org/ghc/ :? for help
<command line>: can't load .so/.DLL for: /Users/v/hs/.stack-work/install/x86_64-osx/lts-3.7/7.10.2/lib/x86_64-osx-ghc-7.10.2/GLUT-2.7.0.3-FFXiDYE1CfiDHjNKroBerv/libHSGLUT-2.7.0.3-FFXiDYE1CfiDHjNKroBerv-ghc7.10.2.dylib (dlopen(/Users/v/hs/.stack-work/install/x86_64-osx/lts-3.7/7.10.2/lib/x86_64-osx-ghc-7.10.2/GLUT-2.7.0.3-FFXiDYE1CfiDHjNKroBerv/libHSGLUT-2.7.0.3-FFXiDYE1CfiDHjNKroBerv-ghc7.10.2.dylib, 5): Symbol not found: _glutBitmap8By13
Referenced from: /Users/v/hs/.stack-work/install/x86_64-osx/lts-3.7/7.10.2/lib/x86_64-osx-ghc-7.10.2/GLUT-2.7.0.3-FFXiDYE1CfiDHjNKroBerv/libHSGLUT-2.7.0.3-FFXiDYE1CfiDHjNKroBerv-ghc7.10.2.dylib
Expected in: flat namespace
in /Users/v/hs/.stack-work/install/x86_64-osx/lts-3.7/7.10.2/lib/x86_64-osx-ghc-7.10.2/GLUT-2.7.0.3-FFXiDYE1CfiDHjNKroBerv/libHSGLUT-2.7.0.3-FFXiDYE1CfiDHjNKroBerv-ghc7.10.2.dylib)
如何解决这个问题?
How can that be fixed?
推荐答案
三编辑这个在我的系统中,它的工作:
Tried this in my system and it worked:
cabal install GLUT --ghc-options="-optl-Wl,-framework,GLUT" --reinstall --jobs=1
我在这里找到了这个解决方案:使用GHC 7.10.1 在OS X上使用Haskell GLUT和freeglut时遇到问题
I found this solution here: Trouble building applications with Haskell GLUT and freeglut on OS X with GHC 7.10.1
这篇关于当您包含导入Gloss的项目时,`stack ghci`会失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文