gpoo / ccfinderx

CCFinderX with autotools support
MIT License
52 stars 25 forks source link

make fail:can not find jni.h #1

Open yueguangxuanyuan opened 8 years ago

yueguangxuanyuan commented 8 years ago

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 commented 8 years ago

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

             ^

compilation terminated. make: *\ [ccfx/CCFinderXLib/ccfx_CCFinderXLib_lib_CCFinderXLib_la-CCFinderXLib.lo] 错误 1

gpoo commented 8 years ago

Where is jni.h located in your system?

gpoo commented 8 years ago

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.

yueguangxuanyuan commented 8 years ago

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)

gpoo commented 8 years ago

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 commented 8 years ago

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.