I'm trying to switch from GLUT to GLFW (in the hopes of no longer requiring XQuartz). Trying to run ghci, I'm getting a missing symbol:
Symbol not found: _glosszm1zi13zi1zi1zm2SbZZzz2OFJmq7Y0azz9tdhW7_GraphicsziGlossziInternalsziInterfaceziBackendziGLUT_glutStateInit_closure
I'm using stack. My cabal file has GLFW-b and gloss listed, and I added this section to stack.yaml:
flags:
gloss:
GLFW: true
GLUT: false
But it looks like it's still trying to build against GLUT.
When I run it as a standalone executable, it immediately shuts down without an error message. In ghci I get the error message above.
Is there a way to force it to use GLFW?
Full error:
<command line>: can't load .so/.DLL for: /Users/gmt/.stack/snapshots/x86_64-osx/3671c966043fb4524fa957e5dac9cc3fc25b01d7ec3f88305b1ec533a7da6d13/8.6.5/lib/x86_64-osx-ghc-8.6.5/libHSgloss-1.13.1.1-2SbZz2OFJmq7Y0az9tdhW7-ghc8.6.5.dylib (dlopen(/Users/gmt/.stack/snapshots/x86_64-osx/3671c966043fb4524fa957e5dac9cc3fc25b01d7ec3f88305b1ec533a7da6d13/8.6.5/lib/x86_64-osx-ghc-8.6.5/libHSgloss-1.13.1.1-2SbZz2OFJmq7Y0az9tdhW7-ghc8.6.5.dylib, 5): Symbol not found: _glosszm1zi13zi1zi1zm2SbZZzz2OFJmq7Y0azz9tdhW7_GraphicsziGlossziInternalsziInterfaceziBackendziGLUT_glutStateInit_closure
Referenced from: /Users/gmt/.stack/snapshots/x86_64-osx/3671c966043fb4524fa957e5dac9cc3fc25b01d7ec3f88305b1ec533a7da6d13/8.6.5/lib/x86_64-osx-ghc-8.6.5/libHSgloss-1.13.1.1-2SbZz2OFJmq7Y0az9tdhW7-ghc8.6.5.dylib
Expected in: flat namespace
in /Users/gmt/.stack/snapshots/x86_64-osx/3671c966043fb4524fa957e5dac9cc3fc25b01d7ec3f88305b1ec533a7da6d13/8.6.5/lib/x86_64-osx-ghc-8.6.5/libHSgloss-1.13.1.1-2SbZz2OFJmq7Y0az9tdhW7-ghc8.6.5.dylib)