【问题标题】:How to get gloss to not close ghci?如何获得光泽以不关闭 ghci?
【发布时间】:2015-04-01 01:39:32
【问题描述】:

gloss 是一个不错的图形库。问题是,当我在ghci 中运行它时,它会在我退出时立即关闭ghci。我尝试使用forkIO,但在关闭窗口后它仍然关闭 ghci。如何让gloss 不关闭 ghci(或至少保留历史记录)还是只使用文件更好?

【问题讨论】:

  • 已确认 ghc-7.8.4、gloss-1.9.2.1、xmonad 用于运行 API 文档网页上给出的示例。

标签: opengl haskell glut ghci gloss


【解决方案1】:

正如网站建议的那样 (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)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-13
    • 1970-01-01
    • 1970-01-01
    • 2016-03-31
    • 1970-01-01
    • 2013-04-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多