Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Android native code build error

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)

Android native code build error

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. 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 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' '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' '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' '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)