I'm trying to use javacpp-presets for LLVM, but there appears to be a link time issue: whenever I try to run my program, I get an error
"Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniLLVM in java.library.path" I'm on a Windows 10 machine.
The follwing is my code
package baecompiler;
//boilerplate code https://github.com/bytedeco/javacpp-presets/tree/master/llvm
//so we can play with LLVM code generation
// General stuff
import org.bytedeco.javacpp.*;
// Headers required by LLVM
import static org.bytedeco.javacpp.LLVM.*;
public class LLVMExperiment {
public static void main (String[] args) {
BytePointer error = new BytePointer((Pointer)null); // Used to retrieve messages from functions
LLVMLinkInMCJIT(); //the line it fails on
....
将 -Djava.library.path=x 添加到命令行,其中 x 是 jniLLVM.dll 文件的完整路径。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.