ccfinderx icon indicating copy to clipboard operation
ccfinderx copied to clipboard

make fail:can not find jni.h

Open yueguangxuanyuan opened this issue 8 years ago • 6 comments

i'm sure that i have built java well. i can find jni.h when i use cmd "locate jni.h" hope you can help me

yueguangxuanyuan avatar Mar 14 '16 07:03 yueguangxuanyuan

In file included from ccfx/CCFinderXLib/CCFinderXLib.cpp:32:0: ccfx/CCFinderXLib/../../GemX/ccfinderx_CCFinderX.h:2:17: fatal error: jni.h: No such file or directory #include <jni.h> ^ compilation terminated. make: *** [ccfx/CCFinderXLib/ccfx_CCFinderXLib_lib_CCFinderXLib_la-CCFinderXLib.lo] 错误 1

yueguangxuanyuan avatar Mar 14 '16 07:03 yueguangxuanyuan

Where is jni.h located in your system?

gpoo avatar Mar 14 '16 18:03 gpoo

Please, paste the output of

$ cd source/of/ccfinderx $ ./configure

There is a rule to check where JNI is located, and it should add it to the compiler flags.

gpoo avatar Mar 14 '16 18:03 gpoo

sorry for bothering you. i am a newer in using these tools.(autoconf ...)

locate jni.h /usr/lib/jvm/java-6-oracle/include/jni.h /usr/lib/jvm/java-7-openjdk-amd64/include/jni.h /usr/lib/jvm/java-7-oracle/include/jni.h

i have already set up java environment

then i check the result of ./configure .there are few mistakes ./configure: line 15304: AX_BOOST_BASE: command not found ./configure: line 15307: AX_JNI_INCLUDE_DIR: command not found

it's in ubuntu14.04 i install boost by apt-get (libboost-all-dev)

yueguangxuanyuan avatar Mar 17 '16 06:03 yueguangxuanyuan

For the macros AX_JNI_INCLUDE_DIR and AX_BOOST_BASE you need to install the package: autoconf-archive.

After that, and if configure is successful, you should be able to build ccfinderx.

gpoo avatar Mar 17 '16 07:03 gpoo

By the way, if you happen to have that package installed, you should run:

$ libtoolize
$ aclocal -I m4 --install
$ autoconf
$ automake --foreign --add-missing
$ ./configure
$ make

As per the instructions in the README.md file.

gpoo avatar Mar 17 '16 07:03 gpoo