使用 cabal for haskell 在 mac 上安装 GLFW 时出错
我有 Max OSx 10.6.8、Xcode 3.2.6(适用于我的 mac 版本的最新版本)。我正在使用 haskell,但在使用 opengl 时遇到问题。
我在网上找到了如下建议:
cabal update
cabal install OpenGL
cabal install GLFW
我的错误出现在第三个命令中。我遇到了一个致命错误,它说:
cabal: Error: some packages failed to install:
GLFW-0.4.2 failed during the building phase. The exception was:
ExitFailure 1
这是错误(有大量警告,为了可读性和空间,我没有包括在内):
glfw/lib/macosx/macosx_window.c:374:0:
error: 'typeLongInteger' undeclared (first use in this function)
glfw/lib/macosx/macosx_window.c:374:0:
error: (Each undeclared identifier is reported only once
glfw/lib/macosx/macosx_window.c:374:0:
error: for each function it appears in.)
glfw/lib/macosx/macosx_window.c: At top level:
glfw/lib/macosx/macosx_window.c:448:0:
error: 'kEventWindowDrawContent' undeclared here (not in a function)
glfw/lib/macosx/macosx_window.c: In function '_glfwWindowEventHandler':
关于如何解决它的任何建议?
这是当我尝试加载需要图形的文件时出现的错误:
Could not find module `Graphics.UI.GLFW':
I'm have Max OSx 10.6.8, Xcode 3.2.6 (the latest version available for my mac version). I'm using haskell but I'm having trouble using opengl.
I found a suggestion a online like the following:
cabal update
cabal install OpenGL
cabal install GLFW
My error came in the 3rd command. I got a fatal error, it says:
cabal: Error: some packages failed to install:
GLFW-0.4.2 failed during the building phase. The exception was:
ExitFailure 1
Here is the error out (there is a large amount of warnings which I'm not including for the sake of readability and space):
glfw/lib/macosx/macosx_window.c:374:0:
error: 'typeLongInteger' undeclared (first use in this function)
glfw/lib/macosx/macosx_window.c:374:0:
error: (Each undeclared identifier is reported only once
glfw/lib/macosx/macosx_window.c:374:0:
error: for each function it appears in.)
glfw/lib/macosx/macosx_window.c: At top level:
glfw/lib/macosx/macosx_window.c:448:0:
error: 'kEventWindowDrawContent' undeclared here (not in a function)
glfw/lib/macosx/macosx_window.c: In function '_glfwWindowEventHandler':
Any suggestions for how to solve it?
This is the error when I try to load a file that requires graphics:
Could not find module `Graphics.UI.GLFW':
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试下载 glfw 源 tarball 并从命令行构建和安装它,而不是使用 cabal。
Instead of using cabal, you could try downloading the glfw source tarball and build and install it from the command-line.