使用 cabal for haskell 在 mac 上安装 GLFW 时出错

发布于 2024-12-27 02:46:54 字数 1091 浏览 1 评论 0原文

我有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

女皇必胜 2025-01-03 02:46:55

您可以尝试下载 glfw 源 tarball 并从命令行构建和安装它,而不是使用 cabal。

Instead of using cabal, you could try downloading the glfw source tarball and build and install it from the command-line.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文