3
我正在使用OpenGL和Haskell。我尝试了样本程序,它使用GHC编译器编译成功,但是当我运行它,我得到这个错误Haskell程序中的GLUT错误
用户错误(未知GLUT进入glutInit)
我搜索了关于这一点,但大部分的答案均与发生此问题的是Mac OS X和Windows。但我在Ubuntu 15.收到此错误
This Question was Previously asked but is related to windows
下面是我使用的示例程序。
import Graphics.Rendering.OpenGL
import Graphics.UI.GLUT
main :: IO()
main = do
(_progName, _args) <- getArgsAndInitialize
_window <- createWindow "Hello World"
displayCallback $= display
mainLoop
display :: IO()
display = do
clear [ ColorBuffer ]
你能否提供你的代码和例子,这将有助于我想象。 –
试试'sudo apt-get install freeglut3' – user2297560
@ user2297560谢谢你在这里分享,它解决了我的问题。 –