问题描述
我正在努力让Kalso包装器用于libsodium在Eclipse中工作.我的第一次尝试是不使用Maven.因此,我下载了Kalium的Jar,下载了libsodium的x64 DLL将其添加到win32文件夹中.
I'm struggling with getting Kalium wrapper for libsodium to work in Eclipse.My first attempt was not to use Maven. So I downloaded Kalium's Jar, downloaded x64 DLL of libsodium added it to win32 folder.
结果?运气不好:我从libsodium包装器中收到一个错误,提示它无法加载库.
Result? no luck: I got an error from the libsodium wrapper that it is unable to load a library.
所以我决定采用官方方式...我不想这么做,因为它需要我不使用的Maven.所以我安装了Maven.将钾盐添加到依赖中;为Eclipse安装了Maven插件.
So I decided to go the official way... I didnt want to as it required maven which I wasn't using.so I installed maven. added Kalium to dependancied; installed Maven plugin for Eclipse.
现在,当我尝试编译加载Kalium lib的项目时.我收到非常类似的错误:
now when I try to compile my projekt which loads Kalium lib. I get very similar error:
java.lang.UnsatisfiedLinkError: unknown
at jnr.ffi.provider.jffi.NativeLibrary.loadNativeLibraries(NativeLibrary.java:87)
at jnr.ffi.provider.jffi.NativeLibrary.getNativeLibraries(NativeLibrary.java:70)
at jnr.ffi.provider.jffi.NativeLibrary.getSymbolAddress(NativeLibrary.java:49)
at jnr.ffi.provider.jffi.NativeLibrary.findSymbolAddress(NativeLibrary.java:59)
at jnr.ffi.provider.jffi.AsmLibraryLoader.generateInterfaceImpl(AsmLibraryLoader.java:117)
at jnr.ffi.provider.jffi.AsmLibraryLoader.loadLibrary(AsmLibraryLoader.java:59)
at jnr.ffi.provider.jffi.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:43)
at jnr.ffi.LibraryLoader.load(LibraryLoader.java:290)
at jnr.ffi.LibraryLoader.load(LibraryLoader.java:269)
at org.abstractj.kalium.NaCl$SingletonHolder.<clinit>(NaCl.java:41)
at org.abstractj.kalium.NaCl.sodium(NaCl.java:28)
at org.abstractj.kalium.keys.KeyPair.<init>(KeyPair.java:36)
Windows是否有libsodium-dev?
is there libsodium-dev for windows?
推荐答案
解决方案:将libsodium.dll重命名为sodium.dll并复制到C:\ ProgramData \ Oracle \ Java \ javapath \
solution:rename libsodium.dll to sodium.dll and copy to C:\ProgramData\Oracle\Java\javapath\
这篇关于libsodium + Windows 10 x64 + Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!