Reputation:
I get an error when i try to import GLUT package
import Graphics.Rendering.OpenGL
import Graphics.UI.GLUT
The error i am getting is :
I don't know how to use Graphics in haskell,
Tell me how i can import GLUT package if it says WinHugs can't find Graphics.UI.GLUT
package.
Update: It would be really nice to get a video link, to understand it fast.
Upvotes: 1
Views: 2203
Reputation:
So, After too much research and study I finally got my solution from myself.
Graphics in Haskell is not a big deal if you are using Haskell Platform, It would be really a tedious task and most probably impossible to work with graphics in WinHugs.
So you should first download & install haskell platform on your machine then you have to download and install(copy) GLUT
packages in your system folder and this will enable you to use them.
For more information you can watch my own youtube video which I've uploaded on my youtube account for quick instruction guide.
Upvotes: 3
Reputation:
This means you are using WinHugs with minimal collection of libraries and that's why you are not facing any problem with import Graphics.Rendering.OpenGL
but as you said import Graphics.UI.GLUT
is not working in your WinHugs, this means you need to add GLUT
package in your WinHugs libraries.
This is a link through which you can get the WinHugs, other programs, and a large collection of libraries.
GLUT
, OpenAL and ALUT packages
only if the corresponding C libraries are already present.Upvotes: 3
Reputation: 26167
WinHugs is really old, and hasn't been updated since 2006. Please switch to the Haskell Platform which uses the GHC compiler instead. If you do that, your code will work out-of-the-box, because the GLUT package is included in the Platform by default.
Upvotes: 4