Android native code build error

asked 2014-05-08 04:42:49 -0600

Leon gravatar image

updated 2014-05-08 04:44:04 -0600

hi there my problem is that i can't build the project correctly in Eclipse.

i've already set the project->properties->C/C++ General->Paths and Symbols to include directory "${NDKROOT}/sources/cxx-stl/gnu-libstdc++/4.6/include" and the NDKROOT is set correctly.

the error says that it has undefined reference to "AndroidBitmap_getInfo".and this is included in the directory above. And I can figure out what's wrong. Could anybody help me with this? The message in the Console is as follows.

17:11:26 * Auto Build of configuration Default for project MyUSBCamera *

"C:\AndroidDev\android-ndk-r9b-windows-x86\android-ndk-r9b\ndk-build.cmd" all [armeabi-v7a] SharedLibrary : libImageProc.so

C:/AndroidDev/android-ndk-r9b-windows-x86/android-ndk-r9b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi-v7a/objs/ImageProc/ImageProc.o: in function Java_com_camera_simplewebcam_CameraPreview_pixeltobmp:jni/ImageProc.c:398: error: undefined reference to 'AndroidBitmap_getInfo'

C:/AndroidDev/android-ndk-r9b-windows-x86/android-ndk-r9b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi-v7a/objs/ImageProc/ImageProc.o: in function Java_com_camera_simplewebcam_CameraPreview_pixeltobmp:jni/ImageProc.c:413: error: undefined reference to 'AndroidBitmap_lockPixels'

C:/AndroidDev/android-ndk-r9b-windows-x86/android-ndk-r9b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi-v7a/objs/ImageProc/ImageProc.o: in function Java_com_camera_simplewebcam_CameraPreview_pixeltobmp:jni/ImageProc.c:424: error: undefined reference to 'AndroidBitmap_unlockPixels'

collect2: ld returned 1 exit status make.exe: * [obj/local/armeabi-v7a/libImageProc.so] Error 1

17:11:28 Build Finished (took 1s.359ms)

edit retag flag offensive close merge delete