FreeGlut 在 ghci 中不起作用
我使用“Glut”编写了一个小程序
import Graphics.Rendering.OpenGL
import Graphics.UI.GLUT
main = do
(progname, _) <- getArgsAndInitialize
createWindow "Hello World"
mainLoop
,由 GHC 编译的程序运行良好(ghc --make t.hs),但是当我尝试从 ghci 运行该程序时,ghci 崩溃并显示消息:
freeglut (<interactive>): ERROR: Internal error
<FBConfig with necessary capabilities not found> in function fgOpenWindow
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 4 (X_DestroyWindow)
Resource id in failed request: 0x0
Serial number of failed request: 33
Current serial number in output stream: 36
Is it possible to run a ghci 的过剩计划?
I wrote a small program using the "Glut"
import Graphics.Rendering.OpenGL
import Graphics.UI.GLUT
main = do
(progname, _) <- getArgsAndInitialize
createWindow "Hello World"
mainLoop
The program, compiled by GHC runs fine (ghc --make t.hs), but when I try to run the program from ghci, ghci crashes with message:
freeglut (<interactive>): ERROR: Internal error
<FBConfig with necessary capabilities not found> in function fgOpenWindow
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 4 (X_DestroyWindow)
Resource id in failed request: 0x0
Serial number of failed request: 33
Current serial number in output stream: 36
Is it possible to run a Glut program from ghci?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我的经验,这似乎与在 Linux 中使用 Nvidia 驱动程序有关。我对这个特定问题的经验仅限于 Ubuntu 11.04,在其中我可以通过卸载专有驱动程序来修复此错误。
In my experience this seems to be related to using the Nvidia drivers in Linux. My experience with this particular problem is limited to Ubuntu 11.04, in which I can remedy this error by uninstalling the proprietary drivers.