使用LLVM运行javacpp预设时出现UnsatisfiedLinkError

时间:2019-03-26 00:46:03

标签: java c++ llvm javacpp

我正在尝试对LLVM使用javacpp-presets,但是似乎存在链接时间问题:每当我尝试运行程序时,都会出现错误

            # very tricky here. We should use 'mogrify' to show us what the real executed query by psycopgs first

            new_sql = cursor.mogrify(sql, values)

            # The mogrify result suggests that psycopgs returns weird bytes with escapes \\, b\ that messes up the sql syntax

           new_sql2 = new_sql.decode("unicode_escape")

            # keep this line to make debugging easier locally

            new_sql3 = str(new_sql2)

            # after decoding, there are still escape symbols here and there. Need to clean them up

            new_sql4 = new_sql3.replace("\\", "")

            cursor.execute(new_sql4)

            # print the real executed sql query in the log file for future debuggin purposes

            print('The query is in the execute_write_sql function is ' + str(cursor.mogrify(new_sql4)))

以下是我的代码

"Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniLLVM in java.library.path" I'm on a Windows 10 machine.

1 个答案:

答案 0 :(得分:1)

在命令行中添加-Djava.library.path = x,其中x是jniLLVM.dll文件的完整路径。