我正在尝试为LLVM使用javacpp-presets,但似乎有一个链接时间问题:每当我尝试运行我的程序时,我都会得到一个错误
"Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniLLVM in java.library.path" I'm on a Windows 10 machine.下面是我的代码
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
....发布于 2019-03-26 09:00:35
在命令行中添加-Djava.library.path=x,其中x是jniLLVM.dll文件的完整路径。
https://stackoverflow.com/questions/55348342
复制相似问题