error: undefined reference to 'sincos' in android jb4.2.2

asked 2013-10-22 22:04:12 -0500

biotrump gravatar image

updated 2013-10-23 02:42:55 -0500

berak gravatar image

opencv tag :2.4.6, 2.4.6.1, 2.4.6.2 android 4.2.2_r1.2 ANDROID_NDK="/home/thomas/build/aosp/jb-4.2.2_r1.2/prebuilts/ndk/current" I have refered to http://code.opencv.org/projects/opencv/wiki/Building_OpenCV4Android_from_trunk ,but I got many sincos error. I tried -lm, but failed.

How to build openCV successfully?

Linking CXX executable ../../bin/opencv_perf_imgproc /home/thomas/build/aosp/jb-4.2.2_r1.2/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld.gold: ../../lib/armeabi-v7a/libopencv_imgproc.a(imgwarp.cpp.o): in function cv::getRotationMatrix2D(cv::Point_<float>, double, double):imgwarp.cpp(.text._ZN2cv19getRotationMatrix2DENS_6Point_IfEEdd+0x2a): error: undefined reference to 'sincos'

edit retag flag offensive close merge delete

Comments

I confirm sin and cos are implemented in bionic/libm/sincos.c

biotrump gravatar imagebiotrump ( 2013-10-22 22:06:42 -0500 )edit

After I downloaded NDK-r8e and tried it, openCV 2.4.6.x can pass building. http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2

biotrump gravatar imagebiotrump ( 2013-10-23 00:11:52 -0500 )edit