gloss
是一个很好的图形库。问题是,当我在 ghci 中运行它时,它会在我退出后立即关闭 ghci 。我尝试使用 forkIO,但关闭窗口后它仍然会关闭 ghci。如何让 gloss
不关闭 ghci(或至少保留历史记录),还是只使用文件更好?
最佳答案
正如网站建议的那样 ( http://gloss.ouroborus.net/ )
A2: Try installing gloss to use the GLFW window manager
interface instead of GLUT: cabal install gloss --flags="GLFW -GLUT"
我可以让它与 ghc-7.6.3 一起工作(在窗口中按 ESC 后,我回到 ghci)
但我无法为 ghc-7.8.4 编译它(因为 cabal 提示)
next goal: GLFW-b (dependency of gloss-1.9.2.1:+glfw)
rejecting: GLFW-b-1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6, 1.4.5, 1.4.4, 1.4.3, 1.4.2,
1.4.1, 1.4, 1.3, 1.2.1, 1.2.0, 1.1.0, 1.0.2, 1.0.1, 1.0.0, 0.1.0.5, 0.1.0.4,
0.1.0.3, 0.1.0.2, 0.1.0.1, 0.1.0.0, 0.0.2.10, 0.0.2.9, 0.0.2.8, 0.0.2.7,
0.0.2.6, 0.0.2.5, 0.0.2.4, 0.0.2.3, 0.0.2.2, 0.0.2.1, 0.0.2, 0.0.1 (conflict:
gloss-1.9.2.1:glfw => GLFW-b>=0.1.4.1 && <0.2)
关于opengl - 如何获得光泽而不关闭ghci?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29381466/