title: undefined reference to myfunction
body: <p>My develop environment is :
  Windows7 + eclsipse + ADT + CDT + NDK (latest version)</p>
  
  <p>The head file code:</p>
  
  <pre><code>#ifndef HEAD_H_
  #define HEAD_H_
  
  #ifdef HAVE_INLINE
  #  if defined(__GNUC_STDC_INLINE__) || defined(GSL_C99_INLINE) ||       defined(HAVE_C99_INLINE)
  #    define INLINE_DECL inline  /* use C99 inline */
  #    define INLINE_FUN inline
  #  else  /*the part real work, since I have define HAVE_INLINE */
  #    define INLINE_DECL         /* use GNU extern inline */
  #    define INLINE_FUN extern inline 
  #  endif
  #else
  #  define INLINE_DECL /* */
  #endif
  extern "C" {
  INLINE_DECL double add(int x, int y);
  
  #ifdef HAVE_INLINE
  INLINE_FUN double add(int x, int y) {
  return x+y;
  }
  #endif
  
  extern inline double ad(int x, int y) {
  return x-y;
   }
  }
  #endif /* HEAD_H_ */
  </code></pre>
  
  <p>The cpp file is :</p>
  
  <pre><code>#include &lt;jni.h&gt;
  #include &lt;android/log.h&gt;
  #include &lt;head.h&gt;
  #include &lt;string.h&gt;
  #include &lt;iostream&gt;
  #include &lt;sstream&gt; 
  #define  LOG_TAG    "OCV:libnative_activity"
  
  #define  LOGD(...)  __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
  #define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
  #define  LOGW(...)  __android_log_print(ANDROID_LOG_WARN,LOG_TAG,__VA_ARGS__)
  #define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
  
  #ifdef __cplusplus
    extern "C" {
  #endif
  
  jstring
  Java_com_igit_testcinline_MainActivity_main(JNIEnv* env, jobject thiz){
      double c = add(1,2);  /*Error, undefined reference to 'add'*/
      double d = ad(2,1);
          .....
  </code></pre>
  
  <p>When I use NDK make, the error "undefined reference to 'add' " will occur in cpp file.
  I don't know why the error occur, but the function ad() work well.</p>