0

我在 Windows 7 上安装了 wodi64。当我尝试编译一个简单的 hello world 程序时:

ocamlopt -o hello hello.ml

我收到一个错误:

File "hello.ml", line 1:
Error: Corrupted compilation unit description
C:/wodi64/opt/wodi64/lib/ocaml/std-lib\pervasives.cmx

hello.ml 文件的内容只是:

print_string "Hello world!\n";;

关于如何解决这个问题的任何想法?谢谢。

4

1 回答 1

2

首先,检查您的文件是否仍然正常。有各种防病毒软件,它们不喜欢 ocaml 编译器并操纵/删除它的文件。

说明(来自已安装的 cygwin shell):

cd /tmp  # or: wget 'http://wodi.forge.ocamlcore.org/wodi64o.md5sum' -O /tmp/wodi64o.md5sum  
godi_console wget 'http://wodi.forge.ocamlcore.org/wodi64o.md5sum'
cd /opt/wodi64
md5sum -c /tmp/wodi64o.md5sum  
# install md5sum via cygwin's setup, if it's not already installed

可能会有一些不匹配,因为配置文件会在运行过程中更新(例如/opt/wodi64/lib/ocaml/std-lib/ld.conf,Makefile.config会有所不同);但二进制文件应该是相同的。

于 2013-05-17T08:48:25.587 回答