title: Building native Opencv for Android with Eclipse gives "undefined reference to `cvCreateFileCapture'"
body: <p>I'm developing an app with native part which uses embedded OpenCV to extract frames from video file. So far I'm getting this error:</p>
  
  <pre><code>.../jni/ocv.c:12: undefined reference to `cvCreateFileCapture'
  </code></pre>
  
  <p>My Android.mk:</p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  
  include $(CLEAR_VARS)
  
  LOCAL_MODULE    := ocv
  LOCAL_SRC_FILES := ocv.c
  
  include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>Application.mk:</p>
  
  <pre><code>APP_STL := gnustl_static
  APP_CPPFLAGS := -frtti -fexceptions
  APP_ABI := armeabi
  </code></pre>
  
  <p>ocv.c:</p>
  
  <pre><code>#include &lt;string.h&gt;
  #include &lt;jni.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;dlfcn.h&gt;
  #include &lt;opencv/cv.h&gt;
  #include &lt;opencv/highgui.h&gt;
  
  jstring Java_com_ice_salvador_MainActivity_invokeNativeFunction(JNIEnv* env, jobject javaThis) {
      IplImage* currFrame = 0;
      CvCapture* cap = 0;
  
      cap = cvCaptureFromFile("/mnt/sdcard/vvv.3gp"); //test video
  
      return (*env)-&gt;NewStringUTF(env, "Hello from native code!");
  }
  </code></pre>
  
  <p>I'm using OpenCV-2.4.3-android-sdk, Android NDK r8b, Eclipse Juno, Windows.</p>
  
  <p><code>IplImage</code>, <code>CvCapture</code> gets resolved and the code compiles if I remove the line with <code>cvCaptureFromFile</code> - so I assume I'm on the right way. I'm new to JNI and OpenCV. Appreciate your help! Thanks.</p>