“链接期间出错”用于用 Ocaml 编写的 Java 编译器
我找到了源代码编写的Java编译器Ocaml 应该可以工作。
但是当我执行 make 时,它完成时出现错误:
unzip.o: In function `camlUnzip__59':
(.data+0x540): undefined reference to `camlzip_deflateEnd'
unzip.o: In function `camlUnzip__59':
(.data+0x544): undefined reference to `camlzip_deflate'
unzip.o: In function `camlUnzip__59':
(.data+0x548): undefined reference to `camlzip_deflateInit'
collect2: ld returned 1 exit status
File "caml_startup", line 1, characters 0-1:
Error: Error during linking
make: *** [javacx] Error 2
奇怪的是,文件夹中甚至不存在文件“caml_startup”。有人可以帮忙吗?非常感谢。
I have found a source of Java compiler written in Ocaml which should work.
But when I do make
, it finished with an error:
unzip.o: In function `camlUnzip__59':
(.data+0x540): undefined reference to `camlzip_deflateEnd'
unzip.o: In function `camlUnzip__59':
(.data+0x544): undefined reference to `camlzip_deflate'
unzip.o: In function `camlUnzip__59':
(.data+0x548): undefined reference to `camlzip_deflateInit'
collect2: ld returned 1 exit status
File "caml_startup", line 1, characters 0-1:
Error: Error during linking
make: *** [javacx] Error 2
It is odd that the file "caml_startup" even does not exist in the folder. Could anyone help? Thank you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
caml_startup
是 OCaml 运行时的一部分。该项目的网站提到它可以与 OCaml 3.09 一起使用,该版本已经很旧了。它对我来说适用于 3.10(它仍然很旧;最新版本是 3.12) - 也许它只是不适用于更新的版本。
但是,作为第一个猜测,我会尝试简单地从
unzip.ml
中删除这些定义 - 它们从未被调用,并声明实际未实现的外部例程(而其他external
>unzip.ml
中的例程在zlib.c
中实现):caml_startup
is part of the OCaml runtime.The project's website mentions that it works with OCaml 3.09, which is quite old. It worked for me with 3.10 (which is still quite old; latest release is 3.12) - maybe it just doesn't work with more recent versions.
However, as a first guess, I would try simply deleting these definitions from
unzip.ml
- they are never called, and declare external routines which are not actually implemented (whereas otherexternal
routines inunzip.ml
are implemented inzlib.c
):