billmccord/OpenCV-Android — Issue #21: undefined reference
Author: jija
Created: 2011-10-15 20:29:26+00:00
State: open

I'm new in NDK and I see this problem

E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvcolor.o): In function `icvBGRx2Lab_32f_CnC3R':
E:/android-opencv/testOpenCV/jni/cv/src/cvcolor.cpp:1880: undefined reference to `cvCbrt'
E:/android-opencv/testOpenCV/jni/cv/src/cvcolor.cpp:1885: undefined reference to `cvCbrt'
E:/android-opencv/testOpenCV/jni/cv/src/cvcolor.cpp:1891: undefined reference to `cvCbrt'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvcolor.o): In function `icvBGRx2Luv_32f_CnC3R':
E:/android-opencv/testOpenCV/jni/cv/src/cvcolor.cpp:2012: undefined reference to `cvCbrt'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvsurf.o): In function `cvExtractSURF':
E:/android-opencv/testOpenCV/jni/cv/src/cvsurf.cpp:299: undefined reference to `cvMinS'
E:/android-opencv/testOpenCV/jni/cv/src/cvsurf.cpp:384: undefined reference to `cvCartToPolar'
E:/android-opencv/testOpenCV/jni/cv/src/cvsurf.cpp:408: undefined reference to `cvFastArctan'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvimgwarp.o): In function `cvWarpPerspective':
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1395: undefined reference to `cvInvert'
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1446: undefined reference to `cvInvert'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvimgwarp.o): In function `cvWarpAffine':
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1122: undefined reference to `cvInvert'
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1123: undefined reference to `cvGEMM'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvimgwarp.o): In function `cvGetAffineTransform':
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1595: undefined reference to `cvSolve'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvimgwarp.o): In function `cvGetPerspectiveTransform':
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:1534: undefined reference to `cvSolve'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvimgwarp.o): In function `cvLogPolar':
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:2228: undefined reference to `cvCartToPolar'
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:2233: undefined reference to `cvLog'
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:2228: undefined reference to `cvCartToPolar'
E:/android-opencv/testOpenCV/jni/cv/src/cvimgwarp.cpp:2233: undefined reference to `cvLog'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvtemplmatch.o): In function `icvCrossCorr(void const*, void const*, void*, CvPoint)':
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:119: undefined reference to `cvGetOptimalDFTSize'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:122: undefined reference to `cvGetOptimalDFTSize'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:134: undefined reference to `cvGetNumThreads'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:122: undefined reference to `cvGetOptimalDFTSize'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:184: undefined reference to `cvDFT'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:198: undefined reference to `cvGetThreadNum'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:253: undefined reference to `cvDFT'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:257: undefined reference to `cvMulSpectrums'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:258: undefined reference to `cvDFT'
E:/android-opencv/testOpenCV/obj/local/armeabi/libcv.a(cvtemplmatch.o): In function `cvMatchTemplate':
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:439: undefined reference to `cvAvgSdv'
E:/android-opencv/testOpenCV/jni/cv/src/cvtemplmatch.cpp:430: undefined reference to `cvAvg'
collect2: ld returned 1 exit status
make: *** [/cygdrive/e/android-opencv/testOpenCV/obj/local/armeabi/libopencv.so] Error 1

How to solve this problem.

PS. I use run cygwin in Eclipse to build