本文介绍了未绑定模块编译Ocaml游戏时发生事件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Ocaml和我的新的试图从。我使用windows 7与ocaml版本4.00.0但是当我尝试使用下面的命令编译。我收到此错误
Am new to Ocaml and i was trying to compile the game mltetris from http://lambda-diode.com/software/ocaml/. I am using windows 7 with ocaml version 4.00.0 however when i try to compile using the command below. I get this error
C:\Users\WASSWA SAM\ocaml stuff\mltetris>ocamlc -pp camlp4o -o tetris.exe human.
ml game.ml play.ml tetris.ml tetris.mli
File "play.ml", line 21, characters 16-26:
Error: Unbound module Event
事件模块不是标准分发的一部分。我使用此命令检查库
Isn't the Event Module supposed to be part of the standard distribution. I checked the libraries using this command
C:\Users\WASSWA SAM\ocaml stuff\mltetris>ocamlfind list
bigarray (version: [distributed with Ocaml])
camlp4 (version: [distributed with Ocaml])
camlp4.exceptiontracer (version: [distributed with Ocaml])
camlp4.extend (version: [distributed with Ocaml])
camlp4.foldgenerator (version: [distributed with Ocaml])
camlp4.fulllib (version: [distributed with Ocaml])
camlp4.gramlib (version: [distributed with Ocaml])
camlp4.lib (version: [distributed with Ocaml])
camlp4.listcomprehension (version: [distributed with Ocaml])
camlp4.locationstripper (version: [distributed with Ocaml])
camlp4.macro (version: [distributed with Ocaml])
camlp4.mapgenerator (version: [distributed with Ocaml])
camlp4.metagenerator (version: [distributed with Ocaml])
camlp4.profiler (version: [distributed with Ocaml])
camlp4.quotations (version: [distributed with Ocaml])
camlp4.quotations.o (version: [distributed with Ocaml])
camlp4.quotations.r (version: [distributed with Ocaml])
camlp4.tracer (version: [distributed with Ocaml])
compiler-libs (version: [distributed with Ocaml])
compiler-libs.bytecomp (version: [distributed with Ocaml])
compiler-libs.common (version: [distributed with Ocaml])
compiler-libs.optcomp (version: [distributed with Ocaml])
compiler-libs.toplevel (version: [distributed with Ocaml])
dbm (version: [distributed with Ocaml])
dynlink (version: [distributed with Ocaml])
findlib (version: 1.3.3)
graphics (version: [distributed with Ocaml])
labltk (version: [distributed with Ocaml])
num (version: [distributed with Ocaml])
num-top (version: 1.3.3)
num.core (version: [internal])
ocamlbuild (version: [distributed with Ocaml])
stdlib (version: [distributed with Ocaml])
str (version: [distributed with Ocaml])
threads (version: [distributed with Ocaml])
threads.posix (version: [internal])
unix (version: [distributed with Ocaml])
缺少我不知道是什么问题。
What's missing I don't know what's wrong.
推荐答案
事件模块似乎是线程设施的一部分。手册说明:
The events module appears to be part of the threads facility. The manual says this:
ocamlc -thread other options unix.cma threads.cma other files
ocamlopt -thread other options unix.cmxa threads.cmxa other files
这篇关于未绑定模块编译Ocaml游戏时发生事件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!