0

I have the following gloss program:

module Easy where

import Graphics.Gloss

main :: IO ()
main = display (InWindow "My Window" (200,200) (10,10)) white (Circle 80)

However when I run stack runghc Easy I get the following error: Easy: user error (unknown GLUT entry glutInit) I tried copying freeglut/bin/(platform)/freeglut.dll to C:\Windows\System32 and renaming it to glut32.dll but the error remains. Can anyone help?

user1023733
  • 805
  • 5
  • 14

1 Answers1

2

From this thread:

I got GLUT to install! I'd been using the 32-bit version of the DLL, but I switched to the 64-bit version and got it to build. For the record, I downloaded this: http://files.transmissionzero.co.uk/software/development/GLUT/freeglut-MinGW.zip

I unzipped it to D:\Projects\libs, which is where I have my third-party libraries, so there's now a D:\Projects\libs\freeglut directory with include, lib, and bin subdirectories. The 64-bit DLL is in an x64 subdirectory in bin.

Next, I made a copy of D:\Projects\libs\freeglut\bin\x64\freeglut.dll in the same directory, naming it glut32.dll.

user1023733
  • 805
  • 5
  • 14