[英]OCaml llvm "Unbound module ExecutionEngine"
I made a post here ( ocaml llvm kaleidoscope tutorial "Unbound module LlvmExecutionEngine" ) but that issue does not seem present on my mac which I have switched to.我在这里发了一篇文章( ocaml llvm kaleidoscope 教程“未绑定模块 LlvmExecutionEngine” ),但我切换到的 Mac 上似乎没有这个问题。
I'm trying to get this to work: https://github.com/llvm-mirror/llvm/tree/master/examples/OCaml-Kaleidoscope/Chapter7我正在尝试让它工作: https : //github.com/llvm-mirror/llvm/tree/master/examples/OCaml-Kaleidoscope/Chapter7
from this tutorial http://llvm.org/docs/tutorial/OCamlLangImpl7.html从本教程http://llvm.org/docs/tutorial/OCamlLangImpl7.html
(I'm 99% sure these two are by the same people) (我 99% 确定这两个是同一个人)
After getting around a few issues I have reached a stumbling block for the last few hours of在解决了几个问题之后,我在最后几个小时遇到了绊脚石
dyn-160-39-160-188:Chapter7 me$ ocamlbuild -use-ocamlfind toy.byte -package llvm llvm_executionengine
Finished, 0 targets (0 cached) in 00:00:00.
+ ocamlfind ocamlc -c -package llvm -o toplevel.cmo toplevel.ml
File "toplevel.ml", line 37, characters 25-53:
Error: Unbound module ExecutionEngine
Command exited with code 2.
Compilation unsuccessful after building 13 targets (12 cached) in 00:00:00.
I'm pretty sure llvm_executionengine is the right package as if I try something else it says it doesn't know what package it is.我很确定 llvm_executionengine 是正确的包,就好像我尝试了其他东西一样,它说它不知道它是什么包。
Here is the line of code with the error:这是带有错误的代码行:
(* JIT the function, returning a function pointer. *)
let result = ExecutionEngine.run_function the_function [||] (*this line*)
the_execution_engine in
print_string "Evaluated to ";
print_float (GenericValue.as_float Codegen.double_type result);
Any help would be super!任何帮助都会很棒!
ocamlfind's CLI doesn't work like that. ocamlfind 的 CLI 不是这样工作的。
-package llvm -package llvm.execution
should work. -package llvm -package llvm.execution
应该可以工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.