OCaml llvm“Unbound module ExecutionEngine” [英] OCaml llvm "Unbound module ExecutionEngine"
问题描述
我在这里发表了一篇文章( ocaml llvm kaleidoscope tutorialUnbound module LlvmExecutionEngine),但这个问题似乎不存在在我的mac,我已经切换到。
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.
我想让这个工作:
https://github.com/llvm-mirror/llvm/tree/master/examples/OCaml-Kaleidoscope/Chapter7
从本教程
http:// llvm。 org / docs / tutorial / OCamlLangImpl7.html
(我99%确定这两个人是同一个人)
(I'm 99% sure these two are by the same people)
在遇到几个问题后,我在最近几个小时遇到了一个绊脚石。
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.
我确定llvm_executionengine是正确的包,如果我尝试别的东西,知道它是什么包。
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.
以下是出现错误的代码行:
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);
任何帮助都是超级!
推荐答案
ocamlfind的CLI不工作。 -package llvm -package llvm.execution
应该可以正常工作。
ocamlfind's CLI doesn't work like that. -package llvm -package llvm.execution
should work.
这篇关于OCaml llvm“Unbound module ExecutionEngine”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!