如何在Java中包含一个库,该库在C 中具有Java中具有本机绑定(库)的库
How to include a library in Java which in C++ with having native binding in Java (librets)?
我被困在导入最初用C 编写的库,但对Java具有本机绑定。这是图书馆https://github.com/nationalassociationofrealtors/librets,我能够通过doc/build
中的DOC构建它,但是此后呢?我在project/build/
中看到了一些makefiles,我想在Java中导入此库。任何帮助都将不胜感激,因为我在文档中找不到任何东西,我所知道的是有一些makefiles,并且说明该库具有对其他语言的本机绑定。
仔细观察./configure
的输出,并确保配置构建以创建SWIG组件(即Java。)
Option summary: Use ccache .................: no Use dependency checking ....: no Use -fPIC...................: yes Use shared dependencies.....: yes Compile type................: Normal Compile examples............: no Compile SQL compiler........: no Compile SWIG bindings.......: no <-------- should say yes With DotNet...............: no With Java.................: no <--------- me too With PERL.................: no With PHP..................: no With Python 2.............: no With Python 3.............: no With Ruby.................: no With Node.js..............: no Enable Maintainer Docs......: no
我尝试了它,并且需要使用相当最近的版本的SWIG - 比我的包装经理更新。没有这些,Swig绑定就不会建造,也没有Java。
但是,一旦您 do 获得该构建,它应该是一个相当简单的努力,即与任何其他Java项目一样,将呼叫到jar
文件中。谁知道,构建甚至可能会为您生成Javadoc,因此您对此有所了解。
相关文章:
- 我想将一个对T类型的非常量左值引用绑定到一个T类型的临时值
- 在基于范围的for循环中使用结构化绑定声明
- 使用 LuaBridge 将 LuaJIT 绑定到C++会导致"PANIC: unprotected error"
- 尝试通过OCI例程从Oracle获取blob数据,但出现错误:ORA-01008:并非所有变量都绑定
- 在使用GPU支持编译Tensorflow时,会遇到CUDA_TOOLKIT_PATH未绑定变量
- 视觉studo 2019中的漫画和静态/动态绑定
- 将自由函数绑定为类成员函数
- 将常量指针引用绑定到非常量指针
- 在派生类中绑定非静态模板化成员函数
- 绑定派生类方法C++从实例范围之外的分隔 std::function 变量调用
- 在 openGL 中多次绑定缓冲区
- 如何在Java中包含一个库,该库在C 中具有Java中具有本机绑定(库)的库
- 使用JNI将C 类成员函数绑定到Java
- 将 Java 类实例绑定到C++类实例
- 无法正确地向java绑定公开std::pair
- 如何将boost::元组::元组公开到Java绑定
- clang/libclang有Java绑定吗?
- 在Java绑定中循环使用OpenCV Mat
- c++ /Java绑定:应该在哪一边实现多线程
- C++的XML数据绑定,类似于java的JAXB