是否可以通过JNI将静态库链接到Java? [英] Is it possible to link a static library to Java through JNI?
本文介绍了是否可以通过JNI将静态库链接到Java?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以构建一个HelloWorld.lib并使用JNI将其加载到Java应用程序中?还是仅适用于共享库?
Is it possible to build a HelloWorld.lib and load it to a Java application using JNI? Or it just works with shared libraries?
我在JNI文档中找不到明确的答案,没有引用静态库".
I couldn't find a clear answer on the JNI documentation, there's no reference to "static library".
推荐答案
它必须是一个动态库.幸运的是,您可以从静态库中构建一个动态库.
It needs to be a dynamic library. Fortunately, you can build a dynamic library from a static one.
这篇关于是否可以通过JNI将静态库链接到Java?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文