首页 > 其他 > 详细

JNI odx bridge install dependent libs

时间:2019-09-24 23:07:57      阅读:109      评论:0      收藏:0      [点我收藏+]

please copy bellow content to Markdown editor for better reading.

#dependency libs

* libtool
* libxml2
* cjson
* gtest
* glog
* gflags

 

#install guidance on centOS

>* `PKG_CONFIG_PATH`
how to find current `PKG_CONFIG_PATH` by `pkg-config --variable pc_path pkg-config` and
`export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig:/usr/local/lib64/pkgconfig/:/usr/local/lib/pkgconfig/`

>* `m4` check not exist then `sudo yum install m4`
>* `g++` check not exist then `sudo yum install gcc-c++`
>* `cmake` check not exist then `sudo yum install cmake`
>* `libxml2` install by yum, `sudo yum install libxml2`
>* `libtool` install by grade, reference: `https://www.quyu.net/info/856.html`, wget download and make
>* `glib` install by yum, `sudo yum install glib2-devel.x86_64`
>* `gtest` install by source, `sh $ git clone https://github.com/google/googletest.git $ cd googletest/ $ mkdir build $ cd build $ cmake .. $ make $ sudo make install`
>* `cjson` install by source, `https://github.com/arnoldlu/cJSON.git` same as `gtest`
>* `glog` install by yum, `sudo yum install glog-devel`
>* `gflags` install by yum, `sudo yum install gflags-devel`

 

compile to lib cmd

```
cd sourc_code_dir/

g++ -fPIC ../odx/odxd.cpp OdxProxy.cpp -shared -o libjodx.so -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-7.b10.el7.x86_64/include \
-I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-7.b10.el7.x86_64/include/linux \
-I/usr/include/libxml2 -I/usr/local/include/cjson \
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include/ \
-I/usr/include/gio-unix-2.0/ \
-I../odx \
-L/usr/local/lib64/pkgconfig/../../lib64 -lgtest -lpthread -lxml2 -L/usr/local/lib -lcjson -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lglog
```

 

that is all.

 

JNI odx bridge install dependent libs

原文:https://www.cnblogs.com/sinsonglew/p/11581746.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!