>> Ok, you've passed my expertise. Maybe you have to link with -lc?Hopefully one of the ocaml experts will chime in. I figured out what was wrong. LLVM needs to be compiled with --enable-libffi for the external symbol resolution to work properly. This is unfortunately not mentioned in the OCaml version of the LLVM Kaleidoscope tutorials! -- View this message in context: http://old.nabble.com/Linking-with-C-Library-tp28133460p28146796.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Nyx wrote:> >>> Ok, you've passed my expertise. Maybe you have to link with -lc? > Hopefully one of the ocaml experts will chime in. > > I figured out what was wrong. LLVM needs to be compiled with --enable-libffi > for the external symbol resolution to work properly. This is unfortunately > not mentioned in the OCaml version of the LLVM Kaleidoscope tutorials!If that fixed your problem then you aren't using the JIT. --enable-libffi only affects the (very slow and unmaintained) interpreter. You may want to focus on why you're failing to correctly initialize the JIT. Are you calling InitializeNativeTarget()? Nick
>> If that fixed your problem then you aren't using the JIT.--enable-libffi only affects the (very slow and unmaintained) interpreter. You may want to focus on why you're failing to correctly initialize the JIT. Are you calling InitializeNativeTarget()? Ah! I was using ExecutionEngine.create, instead of ExecutionEngine.create_jit - Maxime -- View this message in context: http://old.nabble.com/Linking-with-C-Library-tp28133460p28152139.html Sent from the LLVM - Dev mailing list archive at Nabble.com.