title: .h: No such file or directory NDK Android
body: <p>Hi Ivgot  set the gnu make buldier Cros GCC, and javah create by cygwin, . hedaer files. 
  And I have the .h and .cpp in the same jni direcotry:  I dont understand by this error:</p>
  
  <pre><code>        make all 
       Building file: ../jni/com_jp_algi_CoreC.cpp
    Invoking: Cross G++ Compiler
       g++ -I"C:\android-ndk-r5c\platforms\android-9\arch-arm\usr\include" -O0 -g3 -           Wall -c -fmessage-length=0 -MMD -MP -MF"jni/com_jp_algi_CoreC.d" -                MT"jni/com_jp_algi_CoreC.d" -o "jni/com_jp_algi_CoreC.o" "../jni/com_jp_algi_CoreC.cpp"
           ../jni/com_jp_algi_CoreC.cpp:2:31: fatal error: com_jp_algi_CoreC.h: No such            file or        directory
     jni/subdir.mk:18: recipe for target `jni/com_jp_algi_CoreC.o' failed
     compilation terminated.
      make: *** [jni/com_jp_algi_CoreC.o] Error 1
  </code></pre>
  
  <p>Android buldier works but ...Syas this error no implementaion....of the antive. and I must to use I thnik external make, when I create .h by javah in cygwin...maybe i convert this java project in to C++-add nature..maybe there will be problem? </p>
  
  <p>Ivgot this .mk:</p>
  
  <pre><code>    LOCAL_PATH := $(call my-dir)
  
     include $(CLEAR_VARS)
  
    LOCAL_MODULE    := com_jp_algi_CoreC
  LOCAL_SRC_FILES := com_jp_algi_CoreC.cpp
  
     include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>.cpp:</p>
  
  <pre><code> #include &lt;com_jp_algi_CoreC.h&gt;
      /* Header for class com_jp_algi_CoreC */
  
  
    extern "C" {
  
    JNIEXPORT void JNICALL Java_com_jp_algi_CoreC_vector
   (JNIEnv *env, jobject clazz, jfloatArray input){
  jfloat* flt1=NULL ;
  jsize size = env-&gt;GetArrayLength(input);
  jint i;
  // check if array size &gt;0 and wedont cause exception
  
  
  // allocate buffer for array and get data from Java array
  flt1  = new jfloat[size];
  env-&gt;GetFloatArrayRegion(input,0,size,flt1);
  // exception check. Always use exception check
  
  // do stuff to the array
  
  for (i = 0 ; i &lt; size; i++){
      flt1[i] = 1;
  }
  
  
  
  // vector(flt1);
  // set result to Java array and delete buffer. And exception check of course
  env-&gt;SetFloatArrayRegion(input,0,size,flt1);
  delete[] flt1;
  
  // All is ok
  
    }
  
  
   JNIEXPORT void JNICALL Java_com_jp_algi_CoreC_vector2
    (JNIEnv *, jobject, jfloatArray, jobjectArray);
  
  
     }
  </code></pre>
  
  <p>.h:
            /* DO NOT EDIT THIS FILE - it is machine generated <em>/
            #include 
           /</em> Header for class com_jp_algi_CoreC */</p>
  
  <pre><code>      #ifndef _Included_com_jp_algi_CoreC
        #define _Included_com_jp_algi_CoreC
      #ifdef __cplusplus
      extern "C" {
         #endif
      /*
    * Class:     com_jp_algi_CoreC
   * Method:    vector
   * Signature: ([F)V
      */
    JNIEXPORT void JNICALL Java_com_jp_algi_CoreC_vector
      (JNIEnv *, jobject, jfloatArray);
  
        /*
       * Class:     com_jp_algi_CoreC
     * Method:    vector2
      * Signature: ([F[[F)V
          */
  JNIEXPORT void JNICALL Java_com_jp_algi_CoreC_vector2
     (JNIEnv *, jobject, jfloatArray, jobjectArray);
  
     #ifdef __cplusplus
    }
   #endif
      #endif
  </code></pre>
  
  <p>and this CoreC class:</p>
  
  <pre><code>   package com.jp.algi;
  
    public class CoreC {
          static {
      System.loadLibrary("com_jp_algi_CoreC");
      }
  
  public native void vector(float[] input);
  
  public native void vector2(float[] input, float[][] input2);
  
        }
  </code></pre>