OpenGL +使用 Ocaml 的 GLUT
我在安装 OpenGL(和 GLut)并将其与 Ocaml 一起使用时遇到问题。
我尝试过许多不同的软件包(在 Linux 和 Windows 下)但总是遇到问题 关于未找到的模块或其他。
Linux 和 Windows 哪个更容易?我到底应该做什么?哪种绑定包最好? (绑定就足够了还是我需要下载一些其他东西?)
任何人都可以以易于理解的方式逐步描述它吗?
I have a problem with installing OpenGL (and GLut) and using it with Ocaml.
I have tried many different packages (under both Linux and Windows) and always got problems
about not found modules or other.
What will be easier : Linux or Windows? What should i exactly do? Which package of bindings is the best? ( are bindings is enough or i need to download some other things?)
Could anyone describe it step by step in a way that can be easy to follow?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下是具体步骤:
Here are the exact steps :
目前我没有动力引导您完成安装过程,但这里有一些(希望有帮助的)评论:
您通常希望在 *NIX 中使用 OCaml,因为 OCaml 对它表现出非常明显的偏见。特别是,它的调试器和分析器在 Windows 中不可用。
在 Linux 中安装新库时我随机遇到的一个问题(这可能表明我正在做一些愚蠢的事情,想想看;哦,好吧)是权限错误导致模块加载错误。尝试跟踪相关库的安装位置并检查它们是否可以访问(例如,尝试以用户身份
ls
它们;在目录中查看它们是不够的)。例如,我最近安装了 OCamlMPI,但收到错误,即使我提供了模块的完整路径,它也无法找到模块。
事实证明,它存储的目录 (
$(ocamlc -where)/ocamlmpi
) 的 modmask 为0744
(即drwxr--r--
),而它应该有0755
(即drwxr-xr-x
)。更改权限后,模块加载并正常工作。事实上,这实际上也是我在安装 Python 模块时遇到的问题。也许我正在某个地方做一些愚蠢的事情。
无论如何,我希望这会有所帮助。 :)
I don't have the motivation to walk you through the installation process at the moment, but here are some (hopefully helpful) comments:
You generally want to use OCaml in *NIX because OCaml shows a very clear bias toward it. In particular, its debugger and profiler are not available in Windows.
One issue I randomly run into when installing new libraries in Linux (which may be a sign that I'm doing something dumb, come to think of it; oh, well) is permissions errors causing module loading errors. Try tracking down where the relevant libraries were installed and check that they're accessible (e.g. try
ls
ing them as a user; seeing them in a directory is not enough).For example, I recently installed OCamlMPI but was getting errors about it not being able to find modules even when I gave full paths to them.
It turned out that the directory it was stored in (
$(ocamlc -where)/ocamlmpi
) had a modmask of0744
(i.e.drwxr--r--
) when it should have had0755
(i.e.drwxr-xr-x
). After the permissions were changed, the modules loaded and worked just fine.In fact, that's actually a problem I've run into when installing Python modules, too. Maybe I am doing something dumb somewhere.
Anyway, I hope that helps. :)